llvm-project/clang/test/Lexer/has_feature_efficiency_sanitizer.cpp
Derek Bruening 256c2e14c7 [esan] EfficiencySanitizer driver flags
Summary:
Adds a framework to enable the instrumentation pass for the new
EfficiencySanitizer ("esan") family of tools.  Adds a flag for esan's
cache fragmentation tool via -fsanitize=efficiency-cache-frag.
Adds appropriate tests for the new flag.

Reviewers: eugenis, vitalybuka, aizatsky, filcab

Subscribers: filcab, kubabrecka, llvm-commits, zhaoqin, kcc

Differential Revision: http://reviews.llvm.org/D19169

llvm-svn: 267059
2016-04-21 21:32:04 +00:00

12 lines
391 B
C++

// RUN: %clang_cc1 -E -fsanitize=efficiency-cache-frag %s -o - | FileCheck --check-prefix=CHECK-ESAN %s
// RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-NO-ESAN %s
#if __has_feature(efficiency_sanitizer)
int EfficiencySanitizerEnabled();
#else
int EfficiencySanitizerDisabled();
#endif
// CHECK-ESAN: EfficiencySanitizerEnabled
// CHECK-NO-ESAN: EfficiencySanitizerDisabled