From: Saleem Abdulrasool Date: Mon, 24 Oct 2016 21:25:57 +0000 (+0000) Subject: CodeGen: remove incorrect temporary Twine X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aab877938fd9e997360cae05f30f5e2c51d16710;p=clang CodeGen: remove incorrect temporary Twine 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 --- diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index 56ff5d7935..201bc518f5 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -6282,8 +6282,8 @@ void CGObjCNonFragileABIMac::GenerateCategory(const ObjCCategoryImplDecl *OCD) { Values[1] = ClassGV; std::vector 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.