]> granicus.if.org Git - clang/commitdiff
CodeGen: remove incorrect temporary Twine
authorSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 24 Oct 2016 21:25:57 +0000 (21:25 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 24 Oct 2016 21:25:57 +0000 (21:25 +0000)
Twines should not be stack allocated.  This somehow managed to get past me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285028 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjCMac.cpp

index 56ff5d793581e8c852814120d69efbfdd3876583..201bc518f5f85561f8ad698adeb979b77e31288e 100644 (file)
@@ -6282,8 +6282,8 @@ void CGObjCNonFragileABIMac::GenerateCategory(const ObjCCategoryImplDecl *OCD) {
 
   Values[1] = ClassGV;
   std::vector<llvm::Constant*> Methods;
-  Twine ListName =
-      Interface->getObjCRuntimeNameAsString() + "_$_" + OCD->getName();
+  std::string ListName =
+      (Interface->getObjCRuntimeNameAsString() + "_$_" + OCD->getName()).str();
 
   for (const auto *I : OCD->instance_methods())
     // Instance methods should always be defined.