I don't understand why you need the changes to MCAsmInfo. The intention of 
MCAsmInfo::UseIntegratedAssembler is that it is set to false when parsing 
inline assembly is unsupported or undesirable.

  There's also a -no-integrated-as option (NoIntegratedAssembler in 
LLVMTargetMachine.cpp). Can't clang pass that when it receives its own version 
of -no-integrated-as?


================
Comment at: include/llvm/MC/MCAsmInfo.h:310-315
@@ -309,2 +309,8 @@
 
+    /// Should we parse inline assembly?
+    /// The integrated assembler will usually parse inline assembly.  However,
+    /// when simply generating an object file, it can be useful to prevent this
+    /// (e.g. the Linux kernel uses it as a fancy preprocessor).
+    bool ValidateInlineASMSyntax;
+
   public:
----------------
Isn't this the same as UseIntegratedAssembler above?

================
Comment at: lib/CodeGen/LLVMTargetMachine.cpp:82
@@ -81,2 +81,3 @@
     TmpAsmInfo->setUseIntegratedAssembler(false);
+  TmpAsmInfo->SetValidateInlineAssembly(Options.ValidateInlineASMSyntax);
 
----------------
Why not:
  if (!Options.ValidateInlineASMSyntax)
    TmpAsmInfo->setUseIntegratedAssembler(false);


http://llvm-reviews.chandlerc.com/D2839
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to