2
0

diagnostic-handler-remarks.ll 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. ; RUN: llvm-as < %s >%t.bc
  2. ; PR21108: Diagnostic handlers get pass remarks, even if they're not enabled.
  3. ; Confirm that there are -pass-remarks.
  4. ; RUN: llvm-lto -pass-remarks=inline \
  5. ; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
  6. ; RUN: FileCheck %s -allow-empty -check-prefix=REMARKS
  7. ; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM
  8. ; RUN: llvm-lto -pass-remarks=inline -use-diagnostic-handler \
  9. ; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
  10. ; RUN: FileCheck %s -allow-empty -check-prefix=REMARKS
  11. ; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM
  12. ; Confirm that -pass-remarks are not printed by default.
  13. ; RUN: llvm-lto \
  14. ; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
  15. ; RUN: FileCheck %s -allow-empty
  16. ; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM
  17. ; RUN: llvm-lto -use-diagnostic-handler \
  18. ; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
  19. ; RUN: FileCheck %s -allow-empty
  20. ; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM
  21. ; REMARKS: remark:
  22. ; CHECK-NOT: remark:
  23. ; NM-NOT: foo
  24. ; NM: main
  25. target triple = "x86_64-apple-darwin"
  26. define i32 @foo() {
  27. ret i32 7
  28. }
  29. define i32 @main() {
  30. %i = call i32 @foo()
  31. ret i32 %i
  32. }