summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/FixedLenDecoderEmitter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/TableGen/FixedLenDecoderEmitter.cpp b/utils/TableGen/FixedLenDecoderEmitter.cpp
index c0b51385b1..85f3dbfa5f 100644
--- a/utils/TableGen/FixedLenDecoderEmitter.cpp
+++ b/utils/TableGen/FixedLenDecoderEmitter.cpp
@@ -764,11 +764,11 @@ void FilterChooser::emitBinaryParser(raw_ostream &o, unsigned &Indentation,
static void emitSinglePredicateMatch(raw_ostream &o, StringRef str,
std::string PredicateNamespace) {
- const char *X = str.str().c_str();
- if (X[0] == '!')
- o << "!(Bits & " << PredicateNamespace << "::" << &X[1] << ")";
+ if (str[0] == '!')
+ o << "!(Bits & " << PredicateNamespace << "::"
+ << str.slice(1,str.size()) << ")";
else
- o << "(Bits & " << PredicateNamespace << "::" << X << ")";
+ o << "(Bits & " << PredicateNamespace << "::" << str << ")";
}
bool FilterChooser::emitPredicateMatch(raw_ostream &o, unsigned &Indentation,