[llvm] r229798 - llvm-mc: Use Target::createNullStreamer to fix crashes on target-specific asm directives.
Peter Collingbourne
peter at pcc.me.uk
Wed Feb 18 16:45:04 PST 2015
Author: pcc
Date: Wed Feb 18 18:45:04 2015
New Revision: 229798
URL: http://llvm.org/viewvc/llvm-project?rev=229798&view=rev
Log:
llvm-mc: Use Target::createNullStreamer to fix crashes on target-specific asm directives.
Modified:
llvm/trunk/test/CodeGen/ARM/null-streamer.ll
llvm/trunk/tools/llvm-mc/llvm-mc.cpp
Modified: llvm/trunk/test/CodeGen/ARM/null-streamer.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/null-streamer.ll?rev=229798&r1=229797&r2=229798&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/null-streamer.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/null-streamer.ll Wed Feb 18 18:45:04 2015
@@ -5,3 +5,5 @@ define i32 @main() {
entry:
ret i32 0
}
+
+module asm ".fnstart"
Modified: llvm/trunk/tools/llvm-mc/llvm-mc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/llvm-mc.cpp?rev=229798&r1=229797&r2=229798&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mc/llvm-mc.cpp (original)
+++ llvm/trunk/tools/llvm-mc/llvm-mc.cpp Wed Feb 18 18:45:04 2015
@@ -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);
More information about the llvm-commits
mailing list