; ModuleID = 'rethrow.cpp' target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.10.0" %"class.std::__1::basic_ostream" = type { i32 (...)**, %"class.std::__1::basic_ios" } %"class.std::__1::basic_ios" = type { %"class.std::__1::ios_base", %"class.std::__1::basic_ostream"*, i32 } %"class.std::__1::ios_base" = type { i32 (...)**, i32, i64, i64, i32, i32, i8*, i8*, void (i32, %"class.std::__1::ios_base"*, i32)**, i32*, i64, i64, i64*, i64, i64, i8**, i64, i64 } %"class.std::__1::locale::id" = type { %"struct.std::__1::once_flag", i32 } %"struct.std::__1::once_flag" = type { i64 } %class.MyExceptionB = type { %"class.std::exception", %"class.std::__1::basic_string" } %"class.std::exception" = type { i32 (...)** } %"class.std::__1::basic_string" = type { %"class.std::__1::__compressed_pair" } %"class.std::__1::__compressed_pair" = type { %"class.std::__1::__libcpp_compressed_pair_imp" } %"class.std::__1::__libcpp_compressed_pair_imp" = type { %"struct.std::__1::basic_string, std::__1::allocator >::__rep" } %"struct.std::__1::basic_string, std::__1::allocator >::__rep" = type { %union.anon } %union.anon = type { %"struct.std::__1::basic_string, std::__1::allocator >::__long" } %"struct.std::__1::basic_string, std::__1::allocator >::__long" = type { i64, i64, i8* } %"struct.std::__1::basic_string, std::__1::allocator >::__short" = type { %union.anon.0, [23 x i8] } %union.anon.0 = type { i8 } %"class.std::__1::locale" = type { %"class.std::__1::locale::__imp"* } %"class.std::__1::locale::__imp" = type opaque %"class.std::__1::locale::facet" = type { %"class.std::__1::__shared_count" } %"class.std::__1::__shared_count" = type { i32 (...)**, i64 } %"class.std::__1::ctype" = type { %"class.std::__1::locale::facet", i32*, i8 } %"class.std::__1::basic_ostream >::sentry" = type { i8, %"class.std::__1::basic_ostream"* } %"class.std::__1::basic_streambuf" = type { i32 (...)**, %"class.std::__1::locale", i8*, i8*, i8*, i8*, i8*, i8* } @_ZTV12MyExceptionB = unnamed_addr constant [5 x i8*] [i8* null, i8* bitcast ({ i8*, i8*, i8* }* @_ZTI12MyExceptionB to i8*), i8* bitcast (void (%class.MyExceptionB*)* @_ZN12MyExceptionBD1Ev to i8*), i8* bitcast (void (%class.MyExceptionB*)* @_ZN12MyExceptionBD0Ev to i8*), i8* bitcast (i8* (%class.MyExceptionB*)* @_ZNK12MyExceptionB4whatEv to i8*)] @.str = private unnamed_addr constant [14 x i8] c"MyExceptionB(\00", align 1 @.str1 = private unnamed_addr constant [2 x i8] c")\00", align 1 @_ZTVN10__cxxabiv120__si_class_type_infoE = external global i8* @_ZTS12MyExceptionB = constant [15 x i8] c"12MyExceptionB\00" @_ZTISt9exception = external constant i8* @_ZTI12MyExceptionB = constant { i8*, i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8** @_ZTVN10__cxxabiv120__si_class_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([15 x i8]* @_ZTS12MyExceptionB, i32 0, i32 0), i8* bitcast (i8** @_ZTISt9exception to i8*) } @.str2 = private unnamed_addr constant [4 x i8] c"Foo\00", align 1 @_ZNSt3__14coutE = external global %"class.std::__1::basic_ostream" @.str3 = private unnamed_addr constant [15 x i8] c"Got exception:\00", align 1 @.str4 = private unnamed_addr constant [15 x i8] c" rethrowing...\00", align 1 @.str5 = private unnamed_addr constant [4 x i8] c"Baz\00", align 1 @.str6 = private unnamed_addr constant [21 x i8] c" throwing another...\00", align 1 @.str7 = private unnamed_addr constant [4 x i8] c"Bar\00", align 1 @.str8 = private unnamed_addr constant [21 x i8] c"Main got exception: \00", align 1 @_ZNSt3__15ctypeIcE2idE = external global %"class.std::__1::locale::id" @_ZTVSt9exception = external unnamed_addr constant [5 x i8*] ; Function Attrs: noinline nounwind uwtable define void @_ZN12MyExceptionBC2ENSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE(%class.MyExceptionB* %this, %"class.std::__1::basic_string"* %what) unnamed_addr #0 align 2 { %1 = getelementptr inbounds %class.MyExceptionB* %this, i64 0, i32 0, i32 0 store i32 (...)** bitcast (i8** getelementptr inbounds ([5 x i8*]* @_ZTV12MyExceptionB, i64 0, i64 2) to i32 (...)**), i32 (...)*** %1, align 8, !tbaa !1 %2 = getelementptr inbounds %class.MyExceptionB* %this, i64 0, i32 1 invoke void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_(%"class.std::__1::basic_string"* %2, %"class.std::__1::basic_string"* %what) to label %3 unwind label %4 ;