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

Sergey Dmitrouk sdmitrouk at accesssoftek.com
Wed Dec 3 11:12:43 PST 2014


@rnk

> How will macros interact with diagnostics emitted in Clang?

Hm, I saw some issues with diagnostics before, that's how I found broken `StringRef` instances.
I'm not sure how it works or whether it works correctly with this change. Not sure if `SMLoc` uses any of those tokens.
Thanks for the pointer, I'll look into this.

@echristo

> This is interesting, how does it work in the presence of LTO? One translator per previous translation unit? One per now linked set of modules?

Didn't think about LTO, and my knowledge of its implementation isn't
enough to answer. However, there is a restriction on functions: `asm`-directives block
inlining, maybe the same rule applies during LTO? It would prevent possibly
bad things from happening (e.g. applying wrong set of macros).

http://reviews.llvm.org/D6383






More information about the llvm-commits mailing list