summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/MachO/empty-twice.ll
diff options
context:
space:
mode:
authorKeno Fischer <kfischer@college.harvard.edu>2015-12-05 01:02:53 +0000
committerKeno Fischer <kfischer@college.harvard.edu>2015-12-05 01:02:53 +0000
commit8656d567d9426f6ae62b3f4412c92f3bce1e9f13 (patch)
tree80cae979fe84779ef36c39a3984388912f51eb49 /llvm/test/MC/MachO/empty-twice.ll
parenta465312e9c4b32d24dd7bc1303dc563fc4f81aec (diff)
downloadbcm5719-llvm-8656d567d9426f6ae62b3f4412c92f3bce1e9f13.tar.gz
bcm5719-llvm-8656d567d9426f6ae62b3f4412c92f3bce1e9f13.zip
[MC] Add a test for state reset in MCMachOStreamer
This was fixed in r254751, but untestable until r254774, which added the necessary command line flag to llc. Add a test now to make sure this doesn't regress again. llvm-svn: 254814
Diffstat (limited to 'llvm/test/MC/MachO/empty-twice.ll')
-rw-r--r--llvm/test/MC/MachO/empty-twice.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/MC/MachO/empty-twice.ll b/llvm/test/MC/MachO/empty-twice.ll
new file mode 100644
index 00000000000..6914c73a58d
--- /dev/null
+++ b/llvm/test/MC/MachO/empty-twice.ll
@@ -0,0 +1,12 @@
+; Check that there is no persistent state in the MachO emitter that crashes
+; us when reusing the pass manager.
+; RUN: llc -mtriple=x86_64-apple-darwin -compile-twice -filetype=obj %s -o -
+
+; Force the creation of a DWARF section
+!llvm.dbg.cu = !{!0}
+!llvm.module.flags = !{!3, !4}
+
+!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "LLVM", isOptimized: true)
+!1 = !DIFile(filename: "<stdin>", directory: "/")
+!3 = !{i32 2, !"Dwarf Version", i32 4}
+!4 = !{i32 2, !"Debug Info Version", i32 3}
OpenPOWER on IntegriCloud