aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2015-07-24 16:04:29 +0000
committerMehdi Amini <mehdi.amini@apple.com>2015-07-24 16:04:29 +0000
commitca3cf9e6ff1f4b9f64f51c783ac8cc459090cd4f (patch)
treee4a2430db1b1e63e25652f56e79fba86dca9073a /clang/lib/CodeGen/CodeGenModule.cpp
parent26d481311a6e8c6f347f2fdb259399f60a74209e (diff)
downloadllvm-ca3cf9e6ff1f4b9f64f51c783ac8cc459090cd4f.zip
llvm-ca3cf9e6ff1f4b9f64f51c783ac8cc459090cd4f.tar.gz
llvm-ca3cf9e6ff1f4b9f64f51c783ac8cc459090cd4f.tar.bz2
LLVM API Change: the Module always owns the DataLayout
From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 243115
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index a179ad4..f6bd6a4 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -77,12 +77,11 @@ static CGCXXABI *createCXXABI(CodeGenModule &CGM) {
CodeGenModule::CodeGenModule(ASTContext &C, const HeaderSearchOptions &HSO,
const PreprocessorOptions &PPO,
const CodeGenOptions &CGO, llvm::Module &M,
- const llvm::DataLayout &TD,
DiagnosticsEngine &diags,
CoverageSourceInfo *CoverageInfo)
: Context(C), LangOpts(C.getLangOpts()), HeaderSearchOpts(HSO),
PreprocessorOpts(PPO), CodeGenOpts(CGO), TheModule(M), Diags(diags),
- TheDataLayout(TD), Target(C.getTargetInfo()), ABI(createCXXABI(*this)),
+ Target(C.getTargetInfo()), ABI(createCXXABI(*this)),
VMContext(M.getContext()), TBAA(nullptr), TheTargetCodeGenInfo(nullptr),
Types(*this), VTables(*this), ObjCRuntime(nullptr),
OpenCLRuntime(nullptr), OpenMPRuntime(nullptr), CUDARuntime(nullptr),
@@ -1893,8 +1892,8 @@ void CodeGenModule::EmitTentativeDefinition(const VarDecl *D) {
}
CharUnits CodeGenModule::GetTargetTypeStoreSize(llvm::Type *Ty) const {
- return Context.toCharUnitsFromBits(
- TheDataLayout.getTypeStoreSizeInBits(Ty));
+ return Context.toCharUnitsFromBits(
+ getDataLayout().getTypeStoreSizeInBits(Ty));
}
unsigned CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D,