]> granicus.if.org Git - clang/commit
[XRay][clang] Add flag to choose instrumentation bundles
authorDean Michael Berris <dberris@google.com>
Fri, 13 Apr 2018 02:31:58 +0000 (02:31 +0000)
committerDean Michael Berris <dberris@google.com>
Fri, 13 Apr 2018 02:31:58 +0000 (02:31 +0000)
commita50e57f11bc27237bfa967fdc2835b0941972f9b
tree66969eed2bc247986197bf300324ba865a44b543
parent5610ca6099a9f08e56556fd9e4d7a980da2fcd88
[XRay][clang] Add flag to choose instrumentation bundles

Summary:
This change addresses http://llvm.org/PR36926 by allowing users to pick
which instrumentation bundles to use, when instrumenting with XRay. In
particular, the flag `-fxray-instrumentation-bundle=` has four valid
values:

- `all`: the default, emits all instrumentation kinds
- `none`: equivalent to -fnoxray-instrument
- `function`: emits the entry/exit instrumentation
- `custom`: emits the custom event instrumentation

These can be combined either as comma-separated values, or as
repeated flag values.

Reviewers: echristo, kpw, eizan, pelikan

Reviewed By: pelikan

Subscribers: mgorny, cfe-commits

Differential Revision: https://reviews.llvm.org/D44970

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329985 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/clang/Basic/XRayInstr.h [new file with mode: 0644]
include/clang/Driver/Options.td
include/clang/Driver/XRayArgs.h
include/clang/Frontend/CodeGenOptions.h
lib/Basic/CMakeLists.txt
lib/Basic/XRayInstr.cpp [new file with mode: 0644]
lib/CodeGen/CGBuiltin.cpp
lib/CodeGen/CodeGenFunction.cpp
lib/CodeGen/CodeGenModule.cpp
lib/Driver/XRayArgs.cpp
lib/Frontend/CompilerInvocation.cpp
test/CodeGen/xray-instrumentation-bundles.cpp [new file with mode: 0644]