Handle MS-style inline assembly in clang-modernize

Nikola Smiljanic popizdeh at gmail.com
Mon Nov 24 14:30:55 PST 2014


On Tue, Nov 25, 2014 at 8:59 AM, Reid Kleckner <rnk at google.com> wrote:

> If Clang is configured without x86 backend support, there will be linker
> errors here. I believe we have a wrapper called
> InitializeAllRegisteredTargets() and some cmake way to link in all target
> libraries. We could just do that.
>

Yeah, I saw those functions but they seemed like an overkill. This is only
needed for x86 as Microsoft doesn't allow inline assembly on x64. Plus I
didn't want to spend two hours figuring out what libraries to link against.
I'm OK with initializing all targets if that makes sense? Any ideas where I
can find that cmake magic?

It might also be better to make it so that tools can easily recover with a
> partial AST in this situation. They won't be able to see if the inline asm
> blob uses any parameters so any refactorings could possibly be broken, but
> that was already the case for clang-modernize.
>

I don't follow :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141125/9402787a/attachment.html>


More information about the cfe-commits mailing list