diff options
author | Duncan Sands <baldrick@free.fr> | 2007-05-04 17:14:42 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2007-05-04 17:14:42 +0000 |
commit | 6e5011d20837a7fcc1faafb7e89aebf734c719ed (patch) | |
tree | 3326596de6bde8a115dbfe784946ce9be3a6d6ef | |
parent | 4cb9eb81ef4702fb2a34cb783fe89b1b7030e6d1 (diff) | |
download | bcm5719-llvm-6e5011d20837a7fcc1faafb7e89aebf734c719ed.tar.gz bcm5719-llvm-6e5011d20837a7fcc1faafb7e89aebf734c719ed.zip |
Test that the eh lowering code can handle constant folded bitcasts.
llvm-svn: 36746
-rw-r--r-- | llvm/test/CodeGen/Generic/2007-05-03-EHTypeInfo.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Generic/2007-05-03-EHTypeInfo.ll b/llvm/test/CodeGen/Generic/2007-05-03-EHTypeInfo.ll new file mode 100644 index 00000000000..2efe939d8c5 --- /dev/null +++ b/llvm/test/CodeGen/Generic/2007-05-03-EHTypeInfo.ll @@ -0,0 +1,12 @@ +; RUN: llvm-as < %s | llc -enable-eh + + %struct.exception = type { i8, i8, i32, i8*, i8*, i32, i8* } +@program_error = external global %struct.exception ; <%struct.exception*> [#uses=1] + +define void @typeinfo() { +entry: + %eh_typeid = tail call i32 @llvm.eh.typeid.for( i8* getelementptr (%struct.exception* @program_error, i32 0, i32 0) ) ; <i32> [#uses=0] + ret void +} + +declare i32 @llvm.eh.typeid.for(i8*) |