Allow a target to create a null streamer.

Targets can assume that a target streamer is present, so they have to be able
to construct a null streamer in order to set the target streamer in it to.

Fixes a crash when using the null streamer with arm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211358 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2014-06-20 13:11:28 +00:00
parent 729aa1dbd3
commit 61b696f1fa
7 changed files with 62 additions and 73 deletions
+1 -1
View File
@@ -209,7 +209,7 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
case CGFT_Null:
// The Null output is intended for use for performance analysis and testing,
// not real users.
AsmStreamer.reset(createNullStreamer(*Context));
AsmStreamer.reset(getTarget().createNullStreamer(*Context));
break;
}