MC: Fix the MCNullStreamer which was broken in r147763.
authorDaniel Dunbar <daniel@zuster.org>
Wed, 22 Feb 2012 23:49:50 +0000 (23:49 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 22 Feb 2012 23:49:50 +0000 (23:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151213 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/MCNullStreamer.cpp
test/CodeGen/X86/null-streamer.ll [new file with mode: 0644]

index ba7f81f722f9e59e0c41427b60647515a7b8b3e0..7ff2d1bf641b25a57827f7bc00a5368b0480c917 100644 (file)
@@ -95,6 +95,10 @@ namespace {
     virtual void EmitInstruction(const MCInst &Inst) {}
 
     virtual void FinishImpl() {}
+
+    virtual void EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame) {
+      RecordProcEnd(Frame);
+    }
     
     /// @}
   };
diff --git a/test/CodeGen/X86/null-streamer.ll b/test/CodeGen/X86/null-streamer.ll
new file mode 100644 (file)
index 0000000..7c0e82f
--- /dev/null
@@ -0,0 +1,11 @@
+; Check the MCNullStreamer operates correctly, at least on a minimal test case.
+;
+; RUN: llc -filetype=null -o %t -march=x86 %s
+
+define void @f0()  {
+  ret void
+}
+
+define void @f1() {
+  ret void
+}