Skip to content

Commit

Permalink
[globalisel][tablegen] Try to make MSVC happy with r299430
Browse files Browse the repository at this point in the history
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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299433 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
dsandersllvm committed Apr 4, 2017
1 parent 3341db9 commit 8eaecfe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions utils/TableGen/GlobalISelEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class OperandPlaceholder {

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;
Expand Down Expand Up @@ -281,7 +281,7 @@ class OperandPredicateMatcher {
/// 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;
}
Expand Down Expand Up @@ -438,7 +438,7 @@ class OperandMatcher : public PredicateListMatcher<OperandPredicateMatcher> {
}
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();
}

Expand Down Expand Up @@ -467,7 +467,7 @@ class OperandMatcher : public PredicateListMatcher<OperandPredicateMatcher> {
/// 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;
Expand Down Expand Up @@ -632,7 +632,7 @@ class InstructionMatcher
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();
Expand Down

0 comments on commit 8eaecfe

Please sign in to comment.