From cfca06d7963fa0909f90483b42a6d7d194d01e08 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 26 Jul 2020 19:36:28 +0000 Subject: Vendor import of llvm-project master 2e10b7a39b9, the last commit before the llvmorg-12-init tag, from which release/11.x was branched. --- llvm/utils/TableGen/CodeGenDAGPatterns.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.h') diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.h b/llvm/utils/TableGen/CodeGenDAGPatterns.h index 2c081b670609..a3b84d76fde9 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+')'; -- cgit v1.2.3