Skip to content

Commit

Permalink
[globalisel][tablegen] Fix non-determinism introduced in r299430.
Browse files Browse the repository at this point in the history
This should fix the last issue on llvm-clang-x86_64-expensive-checks-win.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299436 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
dsandersllvm committed Apr 4, 2017
1 parent 8eaecfe commit 62b3ad7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions utils/TableGen/GlobalISelEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1011,9 +1011,14 @@ StringRef RuleMatcher::getInsnVarName(const InstructionMatcher &InsnMatcher) con

/// Emit a C++ initializer_list containing references to every matched instruction.
void RuleMatcher::emitCxxCapturedInsnList(raw_ostream &OS) {
OS << "{";
SmallVector<StringRef, 2> Names;
for (const auto &Pair : InsnVariableNames)
OS << "&" << Pair.second << ", ";
Names.push_back(Pair.second);
std::sort(Names.begin(), Names.end());

OS << "{";
for (const auto &Name : Names)
OS << "&" << Name << ", ";
OS << "}";
}

Expand Down

0 comments on commit 62b3ad7

Please sign in to comment.