summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Sanders <daniel_l_sanders@apple.com>2017-10-13 21:51:20 +0000
committerDaniel Sanders <daniel_l_sanders@apple.com>2017-10-13 21:51:20 +0000
commit2fed4ffa9e184e6e1c3cd9b10406939b5dda03eb (patch)
tree1e2e60b2363341413f8d2ec7bab026b7f445546a
parentcb5623152df4258ee2f101b2ad0fba5eda5dbdf1 (diff)
downloadbcm5719-llvm-2fed4ffa9e184e6e1c3cd9b10406939b5dda03eb.tar.gz
bcm5719-llvm-2fed4ffa9e184e6e1c3cd9b10406939b5dda03eb.zip
[globalisel][tablegen] Fix a use-after free bug that manifests on non-macOS machines.
llvm-svn: 315765
-rw-r--r--llvm/utils/TableGen/GlobalISelEmitter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/GlobalISelEmitter.cpp b/llvm/utils/TableGen/GlobalISelEmitter.cpp
index 2e86b17d0b9..71a2b2c3f21 100644
--- a/llvm/utils/TableGen/GlobalISelEmitter.cpp
+++ b/llvm/utils/TableGen/GlobalISelEmitter.cpp
@@ -2628,7 +2628,7 @@ void GlobalISelEmitter::emitImmPredicates(
if (!MatchedRecords.empty()) {
OS << "// PatFrag predicates.\n"
<< "enum {\n";
- StringRef EnumeratorSeparator =
+ std::string EnumeratorSeparator =
(" = GIPFP_" + TypeIdentifier + "_Invalid + 1,\n").str();
for (const auto *Record : MatchedRecords) {
OS << " GIPFP_" << TypeIdentifier << "_Predicate_" << Record->getName()
OpenPOWER on IntegriCloud