[llvm] r175082 - [ms-inline asm] Add a comment about the determinism of the rewrite sort.

Chad Rosier mcrosier at apple.com
Wed Feb 13 13:27:17 PST 2013


Author: mcrosier
Date: Wed Feb 13 15:27:17 2013
New Revision: 175082

URL: http://llvm.org/viewvc/llvm-project?rev=175082&view=rev
Log:
[ms-inline asm] Add a comment about the determinism of the rewrite sort.

Modified:
    llvm/trunk/lib/MC/MCParser/AsmParser.cpp

Modified: llvm/trunk/lib/MC/MCParser/AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmParser.cpp?rev=175082&r1=175081&r2=175082&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/AsmParser.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp Wed Feb 13 15:27:17 2013
@@ -4030,6 +4030,8 @@ bool AsmParser::ParseDirectiveMSAlign(SM
   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);





More information about the llvm-commits mailing list