llvm-mc: Use Target::createNullStreamer to fix crashes on target-specific asm directives.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229798 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Peter Collingbourne 2015-02-19 00:45:04 +00:00
parent 99a5e24d34
commit 7d3b145da4
2 changed files with 3 additions and 1 deletions

View File

@ -5,3 +5,5 @@ define i32 @main() {
entry: entry:
ret i32 0 ret i32 0
} }
module asm ".fnstart"

View File

@ -465,7 +465,7 @@ int main(int argc, char **argv) {
MAB, ShowInst)); MAB, ShowInst));
} else if (FileType == OFT_Null) { } else if (FileType == OFT_Null) {
Str.reset(createNullStreamer(Ctx)); Str.reset(TheTarget->createNullStreamer(Ctx));
} else { } else {
assert(FileType == OFT_ObjectFile && "Invalid file type!"); assert(FileType == OFT_ObjectFile && "Invalid file type!");
MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, *STI, Ctx); MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, *STI, Ctx);