1; RUN: llvm-as < %s | llvm-dis > %t.orig 2; RUN: llvm-as < %s | llvm-c-test --echo > %t.echo 3; RUN: diff -w %t.orig %t.echo 4 5%C6object9ClassInfo = type { %C6object9ClassInfo__vtbl*, %C6object9ClassInfo* } 6%C6object9ClassInfo__vtbl = type { %C6object9ClassInfo* } 7%C6object9Exception__vtbl = type { %C6object9ClassInfo* } 8%C6object6Object = type { %C6object6Object__vtbl* } 9%C6object6Object__vtbl = type { %C6object9ClassInfo* } 10%C6object9Throwable = type { %C6object9Throwable__vtbl* } 11%C6object9Throwable__vtbl = type { %C6object9ClassInfo* } 12 13@C6object9ClassInfo__ClassInfo = linkonce_odr constant %C6object9ClassInfo { %C6object9ClassInfo__vtbl* @C6object9ClassInfo__vtblZ, %C6object9ClassInfo* @C6object8TypeInfo__ClassInfo } 14@C6object9ClassInfo__vtblZ = linkonce_odr constant %C6object9ClassInfo__vtbl { %C6object9ClassInfo* @C6object9ClassInfo__ClassInfo } 15@C6object8TypeInfo__ClassInfo = linkonce_odr constant %C6object9ClassInfo { %C6object9ClassInfo__vtbl* @C6object9ClassInfo__vtblZ, %C6object9ClassInfo* @C6object6Object__ClassInfo } 16@C6object6Object__ClassInfo = linkonce_odr constant %C6object9ClassInfo { %C6object9ClassInfo__vtbl* @C6object9ClassInfo__vtblZ, %C6object9ClassInfo* @C6object6Object__ClassInfo } 17@C6object9Throwable__ClassInfo = linkonce_odr constant %C6object9ClassInfo { %C6object9ClassInfo__vtbl* @C6object9ClassInfo__vtblZ, %C6object9ClassInfo* @C6object6Object__ClassInfo } 18@C6object9Exception__ClassInfo = linkonce_odr constant %C6object9ClassInfo { %C6object9ClassInfo__vtbl* @C6object9ClassInfo__vtblZ, %C6object9ClassInfo* @C6object9Throwable__ClassInfo } 19@C6object9Exception__vtblZ = linkonce_odr constant %C6object9Exception__vtbl { %C6object9ClassInfo* @C6object9Exception__ClassInfo } 20@C6object5Error__ClassInfo = linkonce_odr constant %C6object9ClassInfo { %C6object9ClassInfo__vtbl* @C6object9ClassInfo__vtblZ, %C6object9ClassInfo* @C6object9Throwable__ClassInfo } 21 22define i32 @_D8test01494mainFMZi() personality i32 (i32, i32, i64, i8*, i8*)* @__sd_eh_personality { 23body: 24 %0 = invoke noalias i8* @_d_allocmemory(i64 8) 25 to label %then unwind label %landingPad 26 27then: ; preds = %body 28 %1 = bitcast i8* %0 to i8** 29 store i8* bitcast (%C6object9Exception__vtbl* @C6object9Exception__vtblZ to i8*), i8** %1, align 8 30 %2 = bitcast i8* %0 to %C6object6Object* 31 invoke void @_D6object6Object6__ctorFMC6object6ObjectZv(%C6object6Object* %2) 32 to label %then1 unwind label %landingPad 33 34then1: ; preds = %then 35 %3 = bitcast i8* %0 to %C6object9Throwable* 36 invoke void @__sd_eh_throw(%C6object9Throwable* nonnull %3) 37 to label %then2 unwind label %landingPad 38 39then2: ; preds = %then1 40 unreachable 41 42landingPad: ; preds = %then1, %then, %body 43 %4 = landingpad { i8*, i32 } 44 cleanup 45 catch %C6object9ClassInfo* @C6object5Error__ClassInfo 46 catch %C6object9ClassInfo* @C6object9Exception__ClassInfo 47 catch %C6object9ClassInfo* @C6object9Throwable__ClassInfo 48 %5 = extractvalue { i8*, i32 } %4, 1 49 %6 = tail call i32 @llvm.eh.typeid.for(i8* nonnull bitcast (%C6object9ClassInfo* @C6object5Error__ClassInfo to i8*)) 50 %7 = icmp eq i32 %6, %5 51 br i1 %7, label %catch, label %unwind3 52 53catch: ; preds = %unwind5, %unwind3, %landingPad 54 %merge = phi i32 [ 23, %landingPad ], [ 19, %unwind3 ], [ 13, %unwind5 ] 55 ret i32 %merge 56 57unwind3: ; preds = %landingPad 58 %8 = tail call i32 @llvm.eh.typeid.for(i8* nonnull bitcast (%C6object9ClassInfo* @C6object9Exception__ClassInfo to i8*)) 59 %9 = icmp eq i32 %8, %5 60 br i1 %9, label %catch, label %unwind5 61 62unwind5: ; preds = %unwind3 63 %10 = tail call i32 @llvm.eh.typeid.for(i8* nonnull bitcast (%C6object9ClassInfo* @C6object9Throwable__ClassInfo to i8*)) 64 %11 = icmp eq i32 %10, %5 65 br i1 %11, label %catch, label %unwind7 66 67unwind7: ; preds = %unwind5 68 resume { i8*, i32 } %4 69} 70 71declare void @_D6object6Object6__ctorFMC6object6ObjectZv(%C6object6Object*) 72 73declare noalias i8* @_d_allocmemory(i64) 74 75declare i32 @__sd_eh_personality(i32, i32, i64, i8*, i8*) 76 77declare void @__sd_eh_throw(%C6object9Throwable* nonnull) #0 78 79; Function Attrs: nounwind readnone 80declare i32 @llvm.eh.typeid.for(i8*) #1 81 82attributes #0 = { noreturn } 83attributes #1 = { nounwind readnone }