Fix dangling pointer.
authorEli Friedman <eli.friedman@gmail.com>
Fri, 8 Jul 2011 20:07:05 +0000 (20:07 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Fri, 8 Jul 2011 20:07:05 +0000 (20:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134725 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/AsmMatcherEmitter.cpp

index 8da8ab9133114d1496063612315f4fbae686b1c2..d9c3b84d6c22b53f52e1d0c40cb1f789757eecd7 100644 (file)
@@ -1153,7 +1153,7 @@ void AsmMatcherInfo::BuildInfo() {
     assert(FeatureNo < 32 && "Too many subtarget features!");
   }
 
-  StringRef CommentDelimiter = AsmParser->getValueAsString("CommentDelimiter");
+  std::string CommentDelimiter = AsmParser->getValueAsString("CommentDelimiter");
 
   // Parse the instructions; we need to do this first so that we can gather the
   // singleton register classes.