summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2014-05-19 22:36:19 +0000
committerRenato Golin <renato.golin@linaro.org>2014-05-19 22:36:19 +0000
commit9bb2c58e6d75828479e21321456a6c3b0f53414b (patch)
tree9369cbb94447c01f716d046bbc6f2a518c96db32 /lib/CodeGen/CGExpr.cpp
parentd5358b6ebd5aaafac03e24b7a63e4e98235e3bb4 (diff)
downloadclang-9bb2c58e6d75828479e21321456a6c3b0f53414b.tar.gz
clang-9bb2c58e6d75828479e21321456a6c3b0f53414b.tar.bz2
clang-9bb2c58e6d75828479e21321456a6c3b0f53414b.tar.xz
Fix usage of string when StringRef was needed
Also adding a variable to the test, so release bots match %1. This should also calm the gdb buildbot. . git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r--lib/CodeGen/CGExpr.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index 4822769f39..2025f39355 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -1780,7 +1780,9 @@ static LValue EmitGlobalNamedRegister(const VarDecl *VD,
CharUnits Alignment) {
AsmLabelAttr *Asm = VD->getAttr<AsmLabelAttr>();
llvm::Twine Name("llvm.named.register."+Asm->getLabel());
- llvm::NamedMDNode *M = CGM.getModule().getOrInsertNamedMetadata(Name.str());
+ SmallString<256> DummyVec;
+ llvm::NamedMDNode *M =
+ CGM.getModule().getOrInsertNamedMetadata(Name.toStringRef(DummyVec));
if (M->getNumOperands() == 0) {
llvm::MDString *Str = llvm::MDString::get(CGM.getLLVMContext(),
Asm->getLabel());