diff options
Diffstat (limited to 'lib/IR/IRBuilder.cpp')
-rw-r--r-- | lib/IR/IRBuilder.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/IR/IRBuilder.cpp b/lib/IR/IRBuilder.cpp index 335cf363c367..bddb278dee79 100644 --- a/lib/IR/IRBuilder.cpp +++ b/lib/IR/IRBuilder.cpp @@ -25,13 +25,15 @@ using namespace llvm; /// specified. If Name is specified, it is the name of the global variable /// created. GlobalVariable *IRBuilderBase::CreateGlobalString(StringRef Str, - const Twine &Name) { + const Twine &Name, + unsigned AddressSpace) { Constant *StrConstant = ConstantDataArray::getString(Context, Str); Module &M = *BB->getParent()->getParent(); GlobalVariable *GV = new GlobalVariable(M, StrConstant->getType(), true, GlobalValue::PrivateLinkage, - StrConstant); - GV->setName(Name); + StrConstant, Name, nullptr, + GlobalVariable::NotThreadLocal, + AddressSpace); GV->setUnnamedAddr(true); return GV; } |