diff options
author | Dean Michael Berris <dberris@google.com> | 2017-03-30 00:29:36 +0000 |
---|---|---|
committer | Dean Michael Berris <dberris@google.com> | 2017-03-30 00:29:36 +0000 |
commit | 835832d37af3401601264fcd620e9af5720f041f (patch) | |
tree | 63202a36d92c4b7847d77cf960a5c9749f6c0cb5 /clang/lib/Basic/LangOptions.cpp | |
parent | 2ccbac3fee49665c19a201d98e3f2690f50edd3a (diff) | |
download | llvm-835832d37af3401601264fcd620e9af5720f041f.zip llvm-835832d37af3401601264fcd620e9af5720f041f.tar.gz llvm-835832d37af3401601264fcd620e9af5720f041f.tar.bz2 |
[XRay] Add -fxray-{always,never}-instrument= flags to clang
Summary:
The -fxray-always-instrument= and -fxray-never-instrument= flags take
filenames that are used to imbue the XRay instrumentation attributes
using a whitelist mechanism (similar to the sanitizer special cases
list). We use the same syntax and semantics as the sanitizer blacklists
files in the implementation.
As implemented, we respect the attributes that are already defined in
the source file (i.e. those that have the
[[clang::xray_{always,never}_instrument]] attributes) before applying
the always/never instrument lists.
Reviewers: rsmith, chandlerc
Subscribers: jfb, mgorny, cfe-commits
Differential Revision: https://reviews.llvm.org/D30388
llvm-svn: 299041
Diffstat (limited to 'clang/lib/Basic/LangOptions.cpp')
-rw-r--r-- | clang/lib/Basic/LangOptions.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Basic/LangOptions.cpp b/clang/lib/Basic/LangOptions.cpp index ff10a77..c8a7743 100644 --- a/clang/lib/Basic/LangOptions.cpp +++ b/clang/lib/Basic/LangOptions.cpp @@ -33,6 +33,8 @@ void LangOptions::resetNonModularOptions() { // sanitizer options (this affects __has_feature(address_sanitizer) etc). Sanitize.clear(); SanitizerBlacklistFiles.clear(); + XRayAlwaysInstrumentFiles.clear(); + XRayNeverInstrumentFiles.clear(); CurrentModule.clear(); IsHeaderFile = false; |