mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-29 14:06:12 +00:00

Helps with debugging issues caught by the verifier. Plumbed through both normal clang compile and ThinLTO. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D153468
20 lines
887 B
C
20 lines
887 B
C
// Test to ensure -llvm-verify-each works.
|
|
// REQUIRES: x86-registered-target
|
|
|
|
// RUN: %clang_cc1 -O2 -o /dev/null -triple x86_64-unknown-linux-gnu -emit-llvm-bc %s -fdebug-pass-manager 2>&1 | FileCheck %s --check-prefix=NO
|
|
// NO-NOT: Verifying
|
|
|
|
// RUN: %clang_cc1 -O2 -o /dev/null -triple x86_64-unknown-linux-gnu -emit-llvm-bc %s -fdebug-pass-manager -llvm-verify-each 2>&1 | FileCheck %s
|
|
|
|
// RUN: %clang_cc1 -O2 -o %t.o -flto=thin -triple x86_64-unknown-linux-gnu -emit-llvm-bc %s -fdebug-pass-manager -llvm-verify-each 2>&1 | FileCheck %s
|
|
// RUN: llvm-lto -thinlto -o %t %t.o
|
|
|
|
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-obj -O2 -o /dev/null -x ir %t.o -fthinlto-index=%t.thinlto.bc -fdebug-pass-manager -llvm-verify-each 2>&1 | FileCheck %s
|
|
|
|
// CHECK: Verifying function foo
|
|
// CHECK: Running pass: InstCombinePass
|
|
// CHECK: Verifying function foo
|
|
|
|
void foo(void) {
|
|
}
|