From 75ef2f0b459d54015f0551319f4473d000be52aa Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Wed, 31 Oct 2007 20:01:01 +0000 Subject: Take 2. 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 --- clang/CodeGen/CodeGenModule.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'clang/CodeGen/CodeGenModule.cpp') diff --git a/clang/CodeGen/CodeGenModule.cpp b/clang/CodeGen/CodeGenModule.cpp index 70cefea3649..a2023e441ff 100644 --- a/clang/CodeGen/CodeGenModule.cpp +++ b/clang/CodeGen/CodeGenModule.cpp @@ -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. -- cgit v1.2.3