diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-04-05 22:45:47 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-04-05 22:45:47 +0000 |
commit | 1ed728c499b456f3a2362601b616c192731065fc (patch) | |
tree | c9db29565f7cd9a25328d1c929e1c20b3fcb1009 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 1b01e7e26381f72a26be81d531ee02652fce4e59 (diff) | |
download | bcm5719-llvm-1ed728c499b456f3a2362601b616c192731065fc.tar.gz bcm5719-llvm-1ed728c499b456f3a2362601b616c192731065fc.zip |
[opaque pointer type] More GEP API migrations
Looks like the VTable code in particular will need some work to pass
around the pointee type explicitly.
llvm-svn: 234128
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 49cfefa888c..a262f589442 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -2564,8 +2564,8 @@ llvm::Function *CodeGenModule::getIntrinsic(unsigned IID, Tys); } -static llvm::StringMapEntry<llvm::Constant*> & -GetConstantCFStringEntry(llvm::StringMap<llvm::Constant*> &Map, +static llvm::StringMapEntry<llvm::GlobalVariable*> & +GetConstantCFStringEntry(llvm::StringMap<llvm::GlobalVariable*> &Map, const StringLiteral *Literal, bool TargetIsLSB, bool &IsUTF16, @@ -2601,8 +2601,8 @@ GetConstantCFStringEntry(llvm::StringMap<llvm::Constant*> &Map, nullptr)).first; } -static llvm::StringMapEntry<llvm::Constant*> & -GetConstantStringEntry(llvm::StringMap<llvm::Constant*> &Map, +static llvm::StringMapEntry<llvm::GlobalVariable*> & +GetConstantStringEntry(llvm::StringMap<llvm::GlobalVariable*> &Map, const StringLiteral *Literal, unsigned &StringLength) { StringRef String = Literal->getString(); @@ -2614,7 +2614,7 @@ llvm::Constant * CodeGenModule::GetAddrOfConstantCFString(const StringLiteral *Literal) { unsigned StringLength = 0; bool isUTF16 = false; - llvm::StringMapEntry<llvm::Constant*> &Entry = + llvm::StringMapEntry<llvm::GlobalVariable*> &Entry = GetConstantCFStringEntry(CFConstantStringMap, Literal, getDataLayout().isLittleEndian(), isUTF16, StringLength); @@ -2707,10 +2707,10 @@ CodeGenModule::GetAddrOfConstantCFString(const StringLiteral *Literal) { return GV; } -llvm::Constant * +llvm::GlobalVariable * CodeGenModule::GetAddrOfConstantString(const StringLiteral *Literal) { unsigned StringLength = 0; - llvm::StringMapEntry<llvm::Constant*> &Entry = + llvm::StringMapEntry<llvm::GlobalVariable*> &Entry = GetConstantStringEntry(CFConstantStringMap, Literal, StringLength); if (auto *C = Entry.second) @@ -2743,8 +2743,7 @@ CodeGenModule::GetAddrOfConstantString(const StringLiteral *Literal) { V = llvm::ConstantExpr::getGetElementPtr(PTy, GV, Zeros); ConstantStringClassRef = V; } - } - else + } else V = ConstantStringClassRef; if (!NSConstantStringType) { |