diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-04-12 00:29:07 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-04-12 00:29:07 +0000 |
commit | cb4e4eae1afaa243c0654bc5dd668f9eb5085f06 (patch) | |
tree | 33579950a93393c3f035e5d3bc8d1d1e399a30df /lib/VMCore/IRBuilder.cpp | |
parent | 7cbf92d1d9945c35d1021458280bb7984f796a01 (diff) | |
download | external_llvm-cb4e4eae1afaa243c0654bc5dd668f9eb5085f06.zip external_llvm-cb4e4eae1afaa243c0654bc5dd668f9eb5085f06.tar.gz external_llvm-cb4e4eae1afaa243c0654bc5dd668f9eb5085f06.tar.bz2 |
Make IRBuilder support StringRef for building strings.
Also document that the global variables produced are mergable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129330 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/IRBuilder.cpp')
-rw-r--r-- | lib/VMCore/IRBuilder.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/IRBuilder.cpp b/lib/VMCore/IRBuilder.cpp index 1658d79..2149155 100644 --- a/lib/VMCore/IRBuilder.cpp +++ b/lib/VMCore/IRBuilder.cpp @@ -23,7 +23,7 @@ using namespace llvm; /// has array of i8 type filled in with the nul terminated string value /// specified. If Name is specified, it is the name of the global variable /// created. -Value *IRBuilderBase::CreateGlobalString(const char *Str, const Twine &Name) { +Value *IRBuilderBase::CreateGlobalString(StringRef Str, const Twine &Name) { Constant *StrConstant = ConstantArray::get(Context, Str, true); Module &M = *BB->getParent()->getParent(); GlobalVariable *GV = new GlobalVariable(M, StrConstant->getType(), |