Make target info available to clang code generator.  This is far from complete but this helps clang codegen module make progress.

At the moment target triplet and target description strings are hard coded in clang::TargetInfo

llvm-svn: 43572
This commit is contained in:
Devang Patel
2007-10-31 20:01:01 +00:00
parent c55cd9a38a
commit 75ef2f0b45
9 changed files with 40 additions and 12 deletions

View File

@@ -24,9 +24,10 @@ using namespace clang;
using namespace CodeGen;
CodeGenModule::CodeGenModule(ASTContext &C, llvm::Module &M)
: Context(C), TheModule(M),
Types(C, M), MemCpyFn(0), CFConstantStringClassRef(0) {}
CodeGenModule::CodeGenModule(ASTContext &C, llvm::Module &M,
const llvm::TargetData &TD)
: Context(C), TheModule(M), TheTargetData(TD),
Types(C, M, TD), MemCpyFn(0), CFConstantStringClassRef(0) {}
llvm::Constant *CodeGenModule::GetAddrOfGlobalDecl(const ValueDecl *D) {
// See if it is already in the map.