mirror of
https://github.com/RPCS3/llvm.git
synced 2026-08-28 05:10:05 -04:00
2b6ba77f19
Personality is copied as part of copyFunctionAttributes, but it is invalid on a declaration. Remove the personality attribute it the function body is not cloned. Also add a verifier run over output modules in the llvm-split tool. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264667 91177308-0d34-0410-b5e6-96231b3b80d8
19 lines
540 B
LLVM
19 lines
540 B
LLVM
; Test that "personality" attributes are correctly updated when cloning modules.
|
|
; RUN: llvm-split -o %t %s
|
|
; RUN: llvm-dis -o - %t0 | FileCheck --check-prefix=CHECK0 %s
|
|
; RUN: llvm-dis -o - %t1 | FileCheck --check-prefix=CHECK1 %s
|
|
|
|
; CHECK0: define void @foo()
|
|
; CHECK1: declare void @foo()
|
|
define void @foo() {
|
|
ret void
|
|
}
|
|
|
|
; CHECK0: declare void @bar()
|
|
; CHECK0-NOT: personality
|
|
; CHECK1: define void @bar() personality i8* bitcast (void ()* @foo to i8*)
|
|
define void @bar() personality i8* bitcast (void ()* @foo to i8*)
|
|
{
|
|
ret void
|
|
}
|