[PATCH] [inline-asm] Fix scope of assembly macros

Sergey Dmitrouk sdmitrouk at accesssoftek.com
Thu Feb 19 23:24:59 PST 2015


> For MS inline asm, Clang already constructs an llvm::Target in clang/lib/Parse/ParseStmtAsm.cpp from the triple, so it is possible to do.


Yes, it's possible with triple, but there are LLVM LTO tests where at least one of modules doesn't have triple specified (don't remember which one). If you merge all modules before processing them and at least one has triple, everything is OK, if you want to preprocess each module before merging it in, it won't work unless all modules have triple defined (or result will be defined by order of modules).

> I'm not particularly in favor of the approach taken in this patch, where only module assembly can define macros which get used in functions. It's not very intuitive.


Well, not being able to use even module level macros or macros defined in inline assembly, say, one line above in the body of the same function seems to be even less intuitive in my opinion, but:

> Honestly, this is all really horrible. I'm pretty content with the status quo. Maybe we can agree to not implement this? Users can this functionality with the C preprocessor.


OK, I'm not insisting on anything, just want to see this either accepted or closed. Thanks.


http://reviews.llvm.org/D6383

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list