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

llvm-svn: 229798
This commit is contained in:
Peter Collingbourne 2015-02-19 00:45:04 +00:00
parent 20c7259ce9
commit f4498a4fd3
2 changed files with 3 additions and 1 deletions

View File

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

View File

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