projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move TargetRegistry and TargetSelect from Target to Support where they belong.
[oota-llvm.git]
/
lib
/
Target
/
CppBackend
/
CPPBackend.cpp
diff --git
a/lib/Target/CppBackend/CPPBackend.cpp
b/lib/Target/CppBackend/CPPBackend.cpp
index 66c2ca2ed08085ac05ecfdc1cbb87ca0ea0bbf27..dc3a13121ef3001b583e1c2ebcdd10bcfbe33d15 100644
(file)
--- a/
lib/Target/CppBackend/CPPBackend.cpp
+++ b/
lib/Target/CppBackend/CPPBackend.cpp
@@
-29,7
+29,7
@@
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FormattedStream.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FormattedStream.h"
-#include "llvm/
Targe
t/TargetRegistry.h"
+#include "llvm/
Suppor
t/TargetRegistry.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Config/config.h"
#include <algorithm>
#include "llvm/ADT/StringExtras.h"
#include "llvm/Config/config.h"
#include <algorithm>
@@
-77,8
+77,6
@@
extern "C" void LLVMInitializeCppBackendTarget() {
RegisterTargetMachine<CPPTargetMachine> X(TheCppBackendTarget);
}
RegisterTargetMachine<CPPTargetMachine> X(TheCppBackendTarget);
}
-extern "C" void LLVMInitializeCppBackendTargetMC() {}
-
namespace {
typedef std::vector<Type*> TypeList;
typedef std::map<Type*,std::string> TypeMap;
namespace {
typedef std::vector<Type*> TypeList;
typedef std::map<Type*,std::string> TypeMap;
@@
-472,6
+470,9
@@
void CppWriter::printAttributes(const AttrListPtr &PAL,
HANDLE_ATTR(NoImplicitFloat);
HANDLE_ATTR(Naked);
HANDLE_ATTR(InlineHint);
HANDLE_ATTR(NoImplicitFloat);
HANDLE_ATTR(Naked);
HANDLE_ATTR(InlineHint);
+ HANDLE_ATTR(Hotpatch);
+ HANDLE_ATTR(UWTable);
+ HANDLE_ATTR(NonLazyBind);
#undef HANDLE_ATTR
if (attrs & Attribute::StackAlignment)
Out << " | Attribute::constructStackAlignmentFromInt("
#undef HANDLE_ATTR
if (attrs & Attribute::StackAlignment)
Out << " | Attribute::constructStackAlignmentFromInt("
@@
-532,9
+533,9
@@
void CppWriter::printType(Type* Ty) {
}
case Type::StructTyID: {
StructType* ST = cast<StructType>(Ty);
}
case Type::StructTyID: {
StructType* ST = cast<StructType>(Ty);
- if (!ST->is
Anonymous
()) {
+ if (!ST->is
Literal
()) {
Out << "StructType *" << typeName << " = ";
Out << "StructType *" << typeName << " = ";
- Out << "StructType::create
Named
(mod->getContext(), \"";
+ Out << "StructType::create(mod->getContext(), \"";
printEscapedString(ST->getName());
Out << "\");";
nl(Out);
printEscapedString(ST->getName());
Out << "\");";
nl(Out);
@@
-555,7
+556,7
@@
void CppWriter::printType(Type* Ty) {
nl(Out);
}
nl(Out);
}
- if (ST->is
Anonymous
()) {
+ if (ST->is
Literal
()) {
Out << "StructType *" << typeName << " = ";
Out << "StructType::get(" << "mod->getContext(), ";
} else {
Out << "StructType *" << typeName << " = ";
Out << "StructType::get(" << "mod->getContext(), ";
} else {
@@
-1066,6
+1067,11
@@
void CppWriter::printInstruction(const Instruction *I,
}
break;
}
}
break;
}
+ case Instruction::Resume: {
+ Out << "ResumeInst::Create(mod->getContext(), " << opNames[0]
+ << ", " << bbname << ");";
+ break;
+ }
case Instruction::Invoke: {
const InvokeInst* inv = cast<InvokeInst>(I);
Out << "std::vector<Value*> " << iName << "_params;";
case Instruction::Invoke: {
const InvokeInst* inv = cast<InvokeInst>(I);
Out << "std::vector<Value*> " << iName << "_params;";
@@
-1242,8
+1248,7
@@
void CppWriter::printInstruction(const Instruction *I,
nl(Out);
}
Out << "Instruction* " << iName << " = GetElementPtrInst::Create("
nl(Out);
}
Out << "Instruction* " << iName << " = GetElementPtrInst::Create("
- << opNames[0] << ", " << iName << "_indices.begin(), "
- << iName << "_indices.end()";
+ << opNames[0] << ", " << iName << "_indices";
}
Out << ", \"";
printEscapedString(gep->getName());
}
Out << ", \"";
printEscapedString(gep->getName());