[PATCH] D33278: [LLVM][x86][Inline Asm] - Enum support for MS syntax

coby via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 25 08:57:33 PDT 2017


coby added inline comments.


================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:1371
       } else {
-        InlineAsmIdentifierInfo &Info = SM.getIdentifierInfo();
+        InlineAsmIdentifierInfo Info;
         if (ParseIntelIdentifier(Val, Identifier, Info,
----------------
chapuni wrote:
> Is it initialized properly?
yes, but way down along the calling sequence (LookupInlineAsmIdentifier, lib/Sema/SemaStmtAsm,cpp)


================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:1592
+  // Check if the search yielded a constant integer (enum identifier).
+  if (Result && Info.isConstEnum()) {
+    // By creating MCConstantExpr we let the user of Val know it is safe
----------------
chapuni wrote:
> Info might be uninitialized here.
see previous note


https://reviews.llvm.org/D33278





More information about the llvm-commits mailing list