From 0c12b80a10a00b505120bb663305d13269f6e9b8 Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Wed, 13 Feb 2013 21:27:17 +0000 Subject: [PATCH] [ms-inline asm] Add a comment about the determinism of the rewrite sort. llvm-svn: 175082 --- lib/MC/MCParser/AsmParser.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp index 2cce8b0e43f..aa07ecb4e5d 100644 --- a/lib/MC/MCParser/AsmParser.cpp +++ b/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(A); const AsmRewrite *AsmRewriteB = static_cast(B);