From: Keno Fischer Date: Sat, 5 Dec 2015 01:02:53 +0000 (+0000) Subject: [MC] Add a test for state reset in MCMachOStreamer X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=517455ae01552736121c387b27362e2f0244de7e;p=oota-llvm.git [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254814 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/MC/MachO/empty-twice.ll b/test/MC/MachO/empty-twice.ll new file mode 100644 index 00000000000..6914c73a58d --- /dev/null +++ b/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: "", directory: "/") +!3 = !{i32 2, !"Dwarf Version", i32 4} +!4 = !{i32 2, !"Debug Info Version", i32 3}