[lto] Initialize asmparsers.
Summary: They are needed for inline asm during LTO. In particular we hit the report_fatal_error on llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp:138 LLVM ERROR: Inline asm not supported by this streamer because we don't have an asm parser for this target Reviewers: ruiu, rafael Subscribers: Bigcheese, llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D18027 llvm-svn: 263094
This commit is contained in:
parent
e5dc94ee31
commit
03e41ee6a7
|
@ -321,6 +321,7 @@ template <class ELFT> void LinkerDriver::link(opt::InputArgList &Args) {
|
|||
InitializeAllTargets();
|
||||
InitializeAllTargetMCs();
|
||||
InitializeAllAsmPrinters();
|
||||
InitializeAllAsmParsers();
|
||||
|
||||
SymbolTable<ELFT> Symtab;
|
||||
std::unique_ptr<TargetInfo> TI(createTarget());
|
||||
|
|
|
@ -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
|
||||
}
|
Loading…
Reference in New Issue