diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
commit | cfca06d7963fa0909f90483b42a6d7d194d01e08 (patch) | |
tree | 209fb2a2d68f8f277793fc8df46c753d31bc853b /llvm/utils/TableGen/CodeGenDAGPatterns.h | |
parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) |
Notes
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.h')
-rw-r--r-- | llvm/utils/TableGen/CodeGenDAGPatterns.h | 7 |
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+')'; |