blob: f78ab20a129839517d4a4ea5589865bb8bb64929 [file] [log] [blame]
Rong Xu522b5cb2016-02-29 18:54:59 +00001// Test if PGO instrumentation and use pass are invoked.
2//
3// Ensure Pass PGOInstrumentationGenPass is invoked.
4// RUN: %clang_cc1 -O2 -fprofile-instrument=llvm %s -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s -check-prefix=CHECK-PGOGENPASS-INVOKED-INSTR-GEN
5// CHECK-PGOGENPASS-INVOKED-INSTR-GEN: PGOInstrumentationGenPass
6//
7// Ensure Pass PGOInstrumentationGenPass is not invoked.
8// RUN: %clang_cc1 -O2 -fprofile-instrument=clang %s -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s -check-prefix=CHECK-PGOGENPASS-INVOKED-INSTR-GEN-CLANG
9// CHECK-PGOGENPASS-INVOKED-INSTR-GEN-CLANG-NOT: PGOInstrumentationGenPass