[LLVMdev] ignoring inline assembly

Chris Lattner sabre at nondot.org
Thu Mar 9 14:42:47 PST 2006

On Thu, 9 Mar 2006, John Trimble wrote:
> I'm trying to use LLVM to do some semantic analysis of the Linux kernel
> source code and am having issues with the inline assembly. At this juncture
> I really don't care about what the inline assembly contains and I don't
> intend to actually run the compiled version of the source, so if there is a
> way I can tell LLVM to pretend the inline assembly isn't there that would be
> fantastic.


> From my own snooping around in the GCC frontend source code, it seems like
> if I just comment out line 2819:
> error("LLVM does not yet support inline assembly!  Code: '%s'",
> that LLVM should be able to continue just as if the inline assembly wasn't
> there. So, will this infact solve my problem and is this the best way to go
> about it or is there a simpler way?

Yup, that's exactly what I would recommend. :)

You also want to add a "return;" at the top of assemble_asm in varasm.c, 
which will cause it to ignore file-scope inline asm.



More information about the llvm-dev mailing list