summaryrefslogtreecommitdiff
path: root/llvm/utils/TableGen/CodeGenDAGPatterns.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
commitcfca06d7963fa0909f90483b42a6d7d194d01e08 (patch)
tree209fb2a2d68f8f277793fc8df46c753d31bc853b /llvm/utils/TableGen/CodeGenDAGPatterns.h
parent706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff)
Notes
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.h')
-rw-r--r--llvm/utils/TableGen/CodeGenDAGPatterns.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.h b/llvm/utils/TableGen/CodeGenDAGPatterns.h
index 2c081b670609d..a3b84d76fde9e 100644
--- a/llvm/utils/TableGen/CodeGenDAGPatterns.h
+++ b/llvm/utils/TableGen/CodeGenDAGPatterns.h
@@ -430,7 +430,7 @@ class ScopedName {
std::string Identifier;
public:
ScopedName(unsigned Scope, StringRef Identifier)
- : Scope(Scope), Identifier(Identifier) {
+ : Scope(Scope), Identifier(std::string(Identifier)) {
assert(Scope != 0 &&
"Scope == 0 is used to indicate predicates without arguments");
}
@@ -1075,8 +1075,9 @@ public:
// The string will excute in a subclass of SelectionDAGISel.
// Cast to std::string explicitly to avoid ambiguity with StringRef.
std::string C = IsHwMode
- ? std::string("MF->getSubtarget().checkFeatures(\"" + Features + "\")")
- : std::string(Def->getValueAsString("CondString"));
+ ? std::string("MF->getSubtarget().checkFeatures(\"" +
+ Features + "\")")
+ : std::string(Def->getValueAsString("CondString"));
if (C.empty())
return "";
return IfCond ? C : "!("+C+')';