Rong Xu 9837ef56b4 [PGO] cc1 option name change for profile instrumentation
This patch changes cc1 option -fprofile-instr-generate to an enum option
-fprofile-instrument={clang|none}. It also changes cc1 options
-fprofile-instr-generate= to -fprofile-instrument-path=.
The driver level option -fprofile-instr-generate and -fprofile-instr-generate=
remain intact. This change will pave the way to integrate new PGO
instrumentation in IR level.

Review: http://reviews.llvm.org/D16730
llvm-svn: 259811
2016-02-04 18:39:09 +00:00

34 lines
688 B
C++

// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -std=c++11 %s | FileCheck %s
#define BREAK break
enum class MD {
Val1,
Val2
};
void nop() {}
// CHECK: foo
// CHECK-NEXT: File 0, [[@LINE+1]]:16 -> {{[0-9]+}}:2 = #0
void foo(MD i) {
switch (i) {
#define HANDLE_MD(X) \
case MD::X: \
break;
#include "Inputs/md.def"
default:
BREAK;
}
if (false)
nop();
#define HANDLE_MD(X) else if (i == MD::X) { nop(); }
#include "Inputs/md.def"
}
int main(int argc, const char *argv[]) {
foo(MD::Val1);
return 0;
}