2014-10-02 02:36:03 +08:00
|
|
|
; RUN: llvm-as < %s >%t.bc
|
|
|
|
; PR21108: Diagnostic handlers get pass remarks, even if they're not enabled.
|
|
|
|
|
|
|
|
; Confirm that there are -pass-remarks.
|
|
|
|
; RUN: llvm-lto -pass-remarks=inline \
|
|
|
|
; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
|
|
|
|
; RUN: FileCheck %s -allow-empty -check-prefix=REMARKS
|
|
|
|
; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM
|
|
|
|
|
|
|
|
; RUN: llvm-lto -pass-remarks=inline -use-diagnostic-handler \
|
|
|
|
; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
|
2015-11-11 02:52:48 +08:00
|
|
|
; RUN: FileCheck %s -allow-empty -check-prefix=REMARKS_DH
|
2014-10-02 02:36:03 +08:00
|
|
|
; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM
|
|
|
|
|
|
|
|
; Confirm that -pass-remarks are not printed by default.
|
|
|
|
; RUN: llvm-lto \
|
|
|
|
; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
|
|
|
|
; RUN: FileCheck %s -allow-empty
|
|
|
|
; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM
|
|
|
|
|
|
|
|
; RUN: llvm-lto -use-diagnostic-handler \
|
|
|
|
; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
|
|
|
|
; RUN: FileCheck %s -allow-empty
|
|
|
|
; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM
|
|
|
|
|
|
|
|
; REMARKS: remark:
|
2015-11-11 02:52:48 +08:00
|
|
|
; REMARKS_DH: llvm-lto: remark:
|
2014-10-02 02:36:03 +08:00
|
|
|
; CHECK-NOT: remark:
|
2015-11-11 02:52:48 +08:00
|
|
|
; CHECK-NOT: llvm-lto:
|
2014-10-02 02:36:03 +08:00
|
|
|
; NM-NOT: foo
|
|
|
|
; NM: main
|
|
|
|
|
2014-10-02 02:49:58 +08:00
|
|
|
target triple = "x86_64-apple-darwin"
|
|
|
|
|
2014-10-02 02:36:03 +08:00
|
|
|
define i32 @foo() {
|
|
|
|
ret i32 7
|
|
|
|
}
|
|
|
|
|
|
|
|
define i32 @main() {
|
|
|
|
%i = call i32 @foo()
|
|
|
|
ret i32 %i
|
|
|
|
}
|