diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2015-02-19 00:45:02 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2015-02-19 00:45:02 +0000 |
commit | 20c7259ce9189484831519f0b7a02d56406c8613 (patch) | |
tree | 6ea5211d45c4465485a22327895145040317c5c6 /llvm/lib/Object/IRObjectFile.cpp | |
parent | e5ad66f8a9ba5157660e717e603cda66894b512c (diff) | |
download | bcm5719-llvm-20c7259ce9189484831519f0b7a02d56406c8613.tar.gz bcm5719-llvm-20c7259ce9189484831519f0b7a02d56406c8613.zip |
Introduce Target::createNullTargetStreamer and use it from IRObjectFile.
A null MCTargetStreamer allows IRObjectFile to ignore target-specific
directives. Previously we were crashing.
Differential Revision: http://reviews.llvm.org/D7711
llvm-svn: 229797
Diffstat (limited to 'llvm/lib/Object/IRObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/IRObjectFile.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Object/IRObjectFile.cpp b/llvm/lib/Object/IRObjectFile.cpp index 423ed9e9a64..a2cbdcd0380 100644 --- a/llvm/lib/Object/IRObjectFile.cpp +++ b/llvm/lib/Object/IRObjectFile.cpp @@ -73,6 +73,7 @@ IRObjectFile::IRObjectFile(MemoryBufferRef Object, std::unique_ptr<Module> Mod) MCContext MCCtx(MAI.get(), MRI.get(), &MOFI); MOFI.InitMCObjectFileInfo(Triple, Reloc::Default, CodeModel::Default, MCCtx); std::unique_ptr<RecordStreamer> Streamer(new RecordStreamer(MCCtx)); + T->createNullTargetStreamer(*Streamer); std::unique_ptr<MemoryBuffer> Buffer(MemoryBuffer::getMemBuffer(InlineAsm)); SourceMgr SrcMgr; |