[LLVMdev] Linking/archiving bitcodes with module asm

Andrey Belevantsev abel at ispras.ru
Tue Jun 24 00:19:46 PDT 2014


Hello,

I'm archiving a number of bitcode files via gold plugin based on LLVM 3.4. 
  When I find a thumbv7 bitcode with a couple of module asms, I get a 
segfault in ARMAsmParser::parseDirectiveFnStart because getTargetStreamer 
returns NULL.  Frankly, I don't see how this is supposed to work because as 
far as I understood LTOModule::addAsmGlobalSymbols only creates a 
RecordStreamer which is then attached to the MCTargetAsmParser, and no 
TargetStreamer is ever created.

The places that explicitly call createAsmStreamer are only writing assembly 
as llvm-mc or cc1as.  I've tried to follow that scheme in 
addAsmGlobalSymbols but failed.  Any ideas?

Andrey



More information about the llvm-dev mailing list