2010-09-23 02:33:13 +02:00
|
|
|
; RUN: llvm-extract -func foo -S < %s | FileCheck %s
|
|
|
|
; RUN: llvm-extract -delete -func foo -S < %s | FileCheck --check-prefix=DELETE %s
|
|
|
|
; RUN: llvm-as < %s > %t
|
|
|
|
; RUN: llvm-extract -func foo -S %t | FileCheck %s
|
|
|
|
; RUN: llvm-extract -delete -func foo -S %t | FileCheck --check-prefix=DELETE %s
|
|
|
|
|
|
|
|
; llvm-extract uses lazy bitcode loading, so make sure it correctly reads
|
|
|
|
; from bitcode files in addition to assembly files.
|
|
|
|
|
|
|
|
; CHECK: define void @foo() {
|
|
|
|
; CHECK: ret void
|
|
|
|
; CHECK: }
|
2010-09-23 19:25:06 +02:00
|
|
|
|
|
|
|
; The linkonce_odr linkage for foo() should be changed to external linkage.
|
|
|
|
; DELETE: declare void @foo()
|
2010-09-23 02:33:13 +02:00
|
|
|
; DELETE: define void @bar() {
|
2010-09-23 19:25:06 +02:00
|
|
|
; DELETE: call void @foo()
|
2010-09-23 02:33:13 +02:00
|
|
|
; DELETE: ret void
|
|
|
|
; DELETE: }
|
|
|
|
|
2010-09-23 19:25:06 +02:00
|
|
|
define linkonce_odr void @foo() {
|
2010-09-23 02:33:13 +02:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @bar() {
|
2010-09-23 19:25:06 +02:00
|
|
|
call void @foo()
|
2010-09-23 02:33:13 +02:00
|
|
|
ret void
|
|
|
|
}
|