[llvm] r299433 - [globalisel][tablegen] Try to make MSVC happy with r299430
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 4 06:52:00 PDT 2017
Author: dsanders
Date: Tue Apr 4 08:52:00 2017
New Revision: 299433
URL: http://llvm.org/viewvc/llvm-project?rev=299433&view=rev
Log:
[globalisel][tablegen] Try to make MSVC happy with r299430
Fix other cases of 'const StringRef' creeping back in at the same time.
This should fix the llvm-clang-x86_64-expensive-checks-win buildbot.
Modified:
llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp
Modified: llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp?rev=299433&r1=299432&r2=299433&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp Tue Apr 4 08:52:00 2017
@@ -118,7 +118,7 @@ public:
static OperandPlaceholder
CreateMatchReference(InstructionMatcher *InsnMatcher,
- const StringRef InsnVarName, const StringRef SymbolicName) {
+ StringRef InsnVarName, StringRef SymbolicName) {
OperandPlaceholder Result(OP_MatchReference);
Result.MatchReference.InsnMatcher = InsnMatcher;
Result.MatchReference.InsnVarName = InsnVarName;
@@ -281,7 +281,7 @@ public:
/// InstructionOperandMatcher is the only subclass that can return non-null
/// for this.
virtual Optional<const OperandMatcher *>
- getOptionalOperand(const StringRef SymbolicName) const {
+ getOptionalOperand(StringRef SymbolicName) const {
assert(!SymbolicName.empty() && "Cannot lookup unnamed operand");
return None;
}
@@ -438,7 +438,7 @@ public:
}
unsigned getOperandIndex() const { return OpIdx; }
- std::string getOperandExpr(const StringRef InsnVarName) const {
+ std::string getOperandExpr(StringRef InsnVarName) const {
return (InsnVarName + ".getOperand(" + llvm::to_string(OpIdx) + ")").str();
}
@@ -467,7 +467,7 @@ public:
/// Emit a C++ expression that tests whether the instruction named in
/// InsnVarName matches all the predicate and all the operands.
void emitCxxPredicateExpr(raw_ostream &OS, RuleMatcher &Rule,
- const StringRef InsnVarName) const {
+ StringRef InsnVarName) const {
OS << "(/* ";
if (SymbolicName.empty())
OS << "Operand " << OpIdx;
@@ -632,7 +632,7 @@ public:
return None;
}
- const OperandMatcher &getOperand(const StringRef SymbolicName) const {
+ const OperandMatcher &getOperand(StringRef SymbolicName) const {
Optional<const OperandMatcher *>OM = getOptionalOperand(SymbolicName);
if (OM.hasValue())
return *OM.getValue();
More information about the llvm-commits
mailing list