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.

llvm-svn: 285028

clang/lib/CodeGen/CGObjCMac.cpp

index 56ff5d7..201bc51 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.