• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -inline -prune-eh -disable-output
2; PR993
3target datalayout = "e-p:32:32"
4target triple = "i386-unknown-openbsd3.9"
5	%"struct.__gnu_cxx::__normal_iterator<char*,std::basic_string<char, std::char_traits<char>, std::allocator<char> > >" = type { i8* }
6	%"struct.__gnu_cxx::char_producer<char>" = type { i32 (...)** }
7	%struct.__sFILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, i8*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
8	%struct.__sbuf = type { i8*, i32 }
9	%"struct.std::__basic_file<char>" = type { %struct.__sFILE*, i1 }
10	%"struct.std::__codecvt_abstract_base<char,char,__mbstate_t>" = type { %"struct.std::locale::facet" }
11	%"struct.std::bad_alloc" = type { %"struct.__gnu_cxx::char_producer<char>" }
12	%"struct.std::basic_filebuf<char,std::char_traits<char> >" = type { %"struct.std::basic_streambuf<char,std::char_traits<char> >", i32, %"struct.std::__basic_file<char>", i32, %union.__mbstate_t, %union.__mbstate_t, i8*, i32, i1, i1, i1, i1, i8, i8*, i8*, i1, %"struct.std::codecvt<char,char,__mbstate_t>"*, i8*, i32, i8*, i8* }
13	%"struct.std::basic_ios<char,std::char_traits<char> >" = type { %"struct.std::ios_base", %"struct.std::basic_ostream<char,std::char_traits<char> >"*, i8, i1, %"struct.std::basic_streambuf<char,std::char_traits<char> >"*, %"struct.std::ctype<char>"*, %"struct.std::__codecvt_abstract_base<char,char,__mbstate_t>"*, %"struct.std::__codecvt_abstract_base<char,char,__mbstate_t>"* }
14	%"struct.std::basic_iostream<char,std::char_traits<char> >" = type { %"struct.std::locale::facet", %"struct.__gnu_cxx::char_producer<char>", %"struct.std::basic_ios<char,std::char_traits<char> >" }
15	%"struct.std::basic_ofstream<char,std::char_traits<char> >" = type { %"struct.__gnu_cxx::char_producer<char>", %"struct.std::basic_filebuf<char,std::char_traits<char> >", %"struct.std::basic_ios<char,std::char_traits<char> >" }
16	%"struct.std::basic_ostream<char,std::char_traits<char> >" = type { i32 (...)**, %"struct.std::basic_ios<char,std::char_traits<char> >" }
17	%"struct.std::basic_streambuf<char,std::char_traits<char> >" = type { i32 (...)**, i8*, i8*, i8*, i8*, i8*, i8*, %"struct.std::locale" }
18	%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >" = type { %"struct.__gnu_cxx::__normal_iterator<char*,std::basic_string<char, std::char_traits<char>, std::allocator<char> > >" }
19	%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Rep" = type { %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Rep_base" }
20	%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Rep_base" = type { i32, i32, i32 }
21	%"struct.std::codecvt<char,char,__mbstate_t>" = type { %"struct.std::__codecvt_abstract_base<char,char,__mbstate_t>", i32* }
22	%"struct.std::ctype<char>" = type { %"struct.std::__codecvt_abstract_base<char,char,__mbstate_t>", i32*, i1, i32*, i32*, i32* }
23	%"struct.std::domain_error" = type { %"struct.std::logic_error" }
24	%"struct.std::ios_base" = type { i32 (...)**, i32, i32, i32, i32, i32, %"struct.std::ios_base::_Callback_list"*, %struct.__sbuf, [8 x %struct.__sbuf], i32, %struct.__sbuf*, %"struct.std::locale" }
25	%"struct.std::ios_base::_Callback_list" = type { %"struct.std::ios_base::_Callback_list"*, void (i32, %"struct.std::ios_base"*, i32)*, i32, i32 }
26	%"struct.std::ios_base::_Words" = type { i8*, i32 }
27	%"struct.std::locale" = type { %"struct.std::locale::_Impl"* }
28	%"struct.std::locale::_Impl" = type { i32, %"struct.std::locale::facet"**, i32, %"struct.std::locale::facet"**, i8** }
29	%"struct.std::locale::facet" = type { i32 (...)**, i32 }
30	%"struct.std::logic_error" = type { %"struct.__gnu_cxx::char_producer<char>", %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >" }
31	%union.__mbstate_t = type { i64, [120 x i8] }
32@.str_1 = external global [17 x i8]		; <[17 x i8]*> [#uses=0]
33@.str_9 = external global [24 x i8]		; <[24 x i8]*> [#uses=0]
34
35define void @main() {
36entry:
37	call fastcc void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode( )
38	ret void
39}
40
41define fastcc void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode() {
42entry:
43	%tmp.6 = icmp eq %"struct.std::basic_filebuf<char,std::char_traits<char> >"* null, null		; <i1> [#uses=1]
44	br i1 %tmp.6, label %then, label %UnifiedReturnBlock
45
46then:		; preds = %entry
47	tail call fastcc void @_ZNSt9basic_iosIcSt11char_traitsIcEE8setstateESt12_Ios_Iostate( )
48	ret void
49
50UnifiedReturnBlock:		; preds = %entry
51	ret void
52}
53
54define fastcc void @_ZN10__cxxabiv111__terminateEPFvvE() {
55entry:
56	unreachable
57}
58
59define void @_ZNSdD0Ev() {
60entry:
61	unreachable
62}
63
64define void @_ZThn8_NSdD1Ev() {
65entry:
66	ret void
67}
68
69define void @_ZNSt13basic_filebufIcSt11char_traitsIcEED0Ev() {
70entry:
71	ret void
72}
73
74define void @_ZNSt13basic_filebufIcSt11char_traitsIcEE9pbackfailEi() {
75entry:
76	unreachable
77}
78
79define fastcc void @_ZNSoD2Ev() {
80entry:
81	unreachable
82}
83
84define fastcc void @_ZNSt9basic_iosIcSt11char_traitsIcEED2Ev() {
85entry:
86	unreachable
87}
88
89define fastcc void @_ZNSt9basic_iosIcSt11char_traitsIcEE8setstateESt12_Ios_Iostate() {
90entry:
91	tail call fastcc void @_ZSt19__throw_ios_failurePKc( )
92	ret void
93}
94
95declare fastcc void @_ZNSaIcED1Ev()
96
97define fastcc void @_ZNSsC1EPKcRKSaIcE() {
98entry:
99	tail call fastcc void @_ZNSs16_S_construct_auxIPKcEEPcT_S3_RKSaIcE12__false_type( )
100	unreachable
101}
102
103define fastcc void @_ZSt14__convert_to_vIyEvPKcRT_RSt12_Ios_IostateRKPii() {
104entry:
105	ret void
106}
107
108define fastcc void @_ZNSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEEC1Ej() {
109entry:
110	ret void
111}
112
113define fastcc void @_ZSt19__throw_ios_failurePKc() {
114entry:
115	call fastcc void @_ZNSsC1EPKcRKSaIcE( )
116	unreachable
117}
118
119define void @_GLOBAL__D__ZSt23lexicographical_compareIPKaS1_EbT_S2_T0_S3_() {
120entry:
121	ret void
122}
123
124define void @_ZNSt9bad_allocD1Ev() {
125entry:
126	unreachable
127}
128
129define fastcc void @_ZSt19__throw_logic_errorPKc() personality i32 (...)* @__gxx_personality_v0 {
130entry:
131	invoke fastcc void @_ZNSt11logic_errorC1ERKSs( )
132			to label %try_exit.0 unwind label %try_catch.0
133
134try_catch.0:		; preds = %entry
135        %exn = landingpad {i8*, i32}
136                 catch i8* null
137	resume { i8*, i32 } %exn
138
139try_exit.0:		; preds = %entry
140	unreachable
141}
142
143define fastcc void @_ZNSt11logic_errorC1ERKSs() {
144entry:
145	call fastcc void @_ZNSsC1ERKSs( )
146	ret void
147}
148
149define void @_ZNSt12domain_errorD1Ev() {
150entry:
151	unreachable
152}
153
154define fastcc void @_ZSt20__throw_length_errorPKc() {
155entry:
156	call fastcc void @_ZNSt12length_errorC1ERKSs( )
157	unreachable
158}
159
160define fastcc void @_ZNSt12length_errorC1ERKSs() personality i32 (...)* @__gxx_personality_v0 {
161entry:
162	invoke fastcc void @_ZNSsC1ERKSs( )
163			to label %_ZNSt11logic_errorC2ERKSs.exit unwind label %invoke_catch.i
164
165invoke_catch.i:		; preds = %entry
166        %exn = landingpad {i8*, i32}
167                 catch i8* null
168	resume { i8*, i32 } %exn
169
170_ZNSt11logic_errorC2ERKSs.exit:		; preds = %entry
171	ret void
172}
173
174define fastcc void @_ZNSs4_Rep9_S_createEjRKSaIcE() {
175entry:
176	call fastcc void @_ZSt20__throw_length_errorPKc( )
177	unreachable
178}
179
180define fastcc void @_ZNSs12_S_constructIN9__gnu_cxx17__normal_iteratorIPcSsEEEES2_T_S4_RKSaIcESt20forward_iterator_tag() {
181entry:
182	unreachable
183}
184
185define fastcc void @_ZNSs16_S_construct_auxIPKcEEPcT_S3_RKSaIcE12__false_type() {
186entry:
187	br i1 false, label %then.1.i, label %endif.1.i
188
189then.1.i:		; preds = %entry
190	call fastcc void @_ZSt19__throw_logic_errorPKc( )
191	br label %endif.1.i
192
193endif.1.i:		; preds = %then.1.i, %entry
194	call fastcc void @_ZNSs4_Rep9_S_createEjRKSaIcE( )
195	unreachable
196}
197
198define fastcc void @_ZNSsC1ERKSs() personality i32 (...)* @__gxx_personality_v0 {
199entry:
200	call fastcc void @_ZNSs4_Rep7_M_grabERKSaIcES2_( )
201	invoke fastcc void @_ZNSaIcEC1ERKS_( )
202			to label %invoke_cont.1 unwind label %invoke_catch.1
203
204invoke_catch.1:		; preds = %entry
205        %exn = landingpad {i8*, i32}
206                 catch i8* null
207	call fastcc void @_ZNSaIcED1Ev( )
208	resume { i8*, i32 } %exn
209
210invoke_cont.1:		; preds = %entry
211	call fastcc void @_ZNSaIcEC2ERKS_( )
212	ret void
213}
214
215define fastcc void @_ZNSaIcEC1ERKS_() {
216entry:
217	ret void
218}
219
220define fastcc void @_ZNSs7replaceEN9__gnu_cxx17__normal_iteratorIPcSsEES2_jc() {
221entry:
222	ret void
223}
224
225define fastcc void @_ZNSs4_Rep7_M_grabERKSaIcES2_() {
226entry:
227	br i1 false, label %else.i, label %cond_true
228
229cond_true:		; preds = %entry
230	ret void
231
232else.i:		; preds = %entry
233	tail call fastcc void @_ZNSs4_Rep9_S_createEjRKSaIcE( )
234	unreachable
235}
236
237define fastcc void @_ZNSaIcEC2ERKS_() {
238entry:
239	ret void
240}
241
242define fastcc void @_ZN9__gnu_cxx12__pool_allocILb1ELi0EE8allocateEj() {
243entry:
244	ret void
245}
246
247define fastcc void @_ZN9__gnu_cxx12__pool_allocILb1ELi0EE9_S_refillEj() {
248entry:
249	unreachable
250}
251
252declare i32 @__gxx_personality_v0(...)
253