[cfe-dev] libclang crash when parsing MS-style inline assembly

Kim Gräsman kim.grasman at gmail.com
Sat Nov 9 02:43:20 PST 2013


On Sat, Nov 9, 2013 at 10:49 AM, Alp Toker <alp at nuanti.com> wrote:
>
> On 09/11/2013 09:23, Kim Gräsman wrote:
>>
>> So we'll just keep the InitializeNativeTarget* calls in main(), and
>> life is good!
>
> Good on x86, not so good when cross-compiling (cross-IWYUing?) from a
> non-Intel architecture. The snippet I gave handles that as long as an
> x86 target has been built in FWIW.

I was just about to ask -- thanks for confirming!

And what controls whether an x86 target is built in? What happens in
its absence? It's not really a critical error for syntax-only tools,
so it would be nice if LLVMInitializeX86* could warn instead of
failing. Or maybe there needs to be a way for tools to ask whether the
target is available before attempting to initialize, so they can shape
the warning themselves.

- Kim




More information about the cfe-dev mailing list