From fbc38d2c16bc2fb923efdbbd6035ec8233fb4856 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 8 Jul 2011 18:04:22 +0000 Subject: Fix a dangling reference. Patch by Dave Abrahams. pr10311 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134709 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/AsmMatcherEmitter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp index 63b0dd9..8da8ab9 100644 --- a/utils/TableGen/AsmMatcherEmitter.cpp +++ b/utils/TableGen/AsmMatcherEmitter.cpp @@ -1825,7 +1825,8 @@ static void EmitComputeAvailableFeatures(AsmMatcherInfo &Info, SubtargetFeatureInfo &SFI = *it->second; OS << " if ("; - StringRef Conds = SFI.TheDef->getValueAsString("AssemblerCondString"); + std::string CondStorage = SFI.TheDef->getValueAsString("AssemblerCondString"); + StringRef Conds = CondStorage; std::pair Comma = Conds.split(','); bool First = true; do { -- cgit v1.1