Index: ELF/Driver.cpp =================================================================== --- ELF/Driver.cpp +++ ELF/Driver.cpp @@ -321,6 +321,7 @@ InitializeAllTargets(); InitializeAllTargetMCs(); InitializeAllAsmPrinters(); + InitializeAllAsmParsers(); SymbolTable Symtab; std::unique_ptr TI(createTarget()); Index: test/ELF/lto/inline-asm.ll =================================================================== --- /dev/null +++ test/ELF/lto/inline-asm.ll @@ -0,0 +1,11 @@ +; REQUIRES: x86 +; RUN: llvm-as %s -o %t.o +; RUN: ld.lld -m elf_x86_64 %t.o -o %t.so -shared + +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +define void @foo() { + call void asm "nop", ""() + ret void +}