summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCParser/AsmParser.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2013-02-13 21:27:17 +0000
committerChad Rosier <mcrosier@apple.com>2013-02-13 21:27:17 +0000
commitf43fcf519472a65db3b142a3396278de25d344b3 (patch)
tree9dfb61b227499d7d257691b0d98544c6f29bca99 /llvm/lib/MC/MCParser/AsmParser.cpp
parentb5e23ef425eafa5483e2fbbda8b8d6e645db0f40 (diff)
downloadbcm5719-llvm-f43fcf519472a65db3b142a3396278de25d344b3.tar.gz
bcm5719-llvm-f43fcf519472a65db3b142a3396278de25d344b3.zip
[ms-inline asm] Add a comment about the determinism of the rewrite sort.
llvm-svn: 175082
Diffstat (limited to 'llvm/lib/MC/MCParser/AsmParser.cpp')
-rw-r--r--llvm/lib/MC/MCParser/AsmParser.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp
index 2cce8b0e43f..aa07ecb4e5d 100644
--- a/llvm/lib/MC/MCParser/AsmParser.cpp
+++ b/llvm/lib/MC/MCParser/AsmParser.cpp
@@ -4030,6 +4030,8 @@ bool AsmParser::ParseDirectiveMSAlign(SMLoc IDLoc, ParseStatementInfo &Info) {
return false;
}
+// We are comparing pointers, but the pointers are relative to a single string.
+// Thus, this should always be deterministic.
static int RewritesSort (const void *A, const void *B) {
const AsmRewrite *AsmRewriteA = static_cast<const AsmRewrite*>(A);
const AsmRewrite *AsmRewriteB = static_cast<const AsmRewrite*>(B);
OpenPOWER on IntegriCloud