summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2014-07-07 23:59:57 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2014-07-07 23:59:57 +0000
commitac4afe49e7b7d17a5b7f5e9872baccd8fb5c8a97 (patch)
tree12bd0e372ba4fd2026f8f1b27ad851e6365ffad9 /clang/lib/CodeGen/CodeGenFunction.cpp
parent28638911cd79f9808edc5f297b16403b8ff370bc (diff)
downloadbcm5719-llvm-ac4afe49e7b7d17a5b7f5e9872baccd8fb5c8a97.tar.gz
bcm5719-llvm-ac4afe49e7b7d17a5b7f5e9872baccd8fb5c8a97.zip
[Sanitizer] Remove brittle cache variable and slightly simplify blacklisting code.
Now CodeGenFunction is responsible for looking at sanitizer blacklist (in CodeGenFunction::StartFunction) and turning off instrumentation, if necessary. No functionality change. llvm-svn: 212501
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 7de619e9158..4b202e136d5 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -37,11 +37,7 @@ CodeGenFunction::CodeGenFunction(CodeGenModule &cgm, bool suppressNewContext)
: CodeGenTypeCache(cgm), CGM(cgm), Target(cgm.getTarget()),
Builder(cgm.getModule().getContext(), llvm::ConstantFolder(),
CGBuilderInserterTy(this)), CapturedStmtInfo(nullptr),
- SanitizePerformTypeCheck(CGM.getSanOpts().Null |
- CGM.getSanOpts().Alignment |
- CGM.getSanOpts().ObjectSize |
- CGM.getSanOpts().Vptr),
- SanOpts(&CGM.getSanOpts()), AutoreleaseResult(false), BlockInfo(nullptr),
+ SanOpts(&CGM.getLangOpts().Sanitize), AutoreleaseResult(false), BlockInfo(nullptr),
BlockPointer(nullptr), LambdaThisCaptureField(nullptr),
NormalCleanupDest(nullptr), NextCleanupDestIndex(1),
FirstBlockInfo(nullptr), EHResumeBlock(nullptr), ExceptionSlot(nullptr),
@@ -539,10 +535,8 @@ void CodeGenFunction::StartFunction(GlobalDecl GD,
CurFnInfo = &FnInfo;
assert(CurFn->isDeclaration() && "Function already has body?");
- if (CGM.getSanitizerBlacklist().isIn(*Fn)) {
+ if (CGM.getSanitizerBlacklist().isIn(*Fn))
SanOpts = &SanitizerOptions::Disabled;
- SanitizePerformTypeCheck = false;
- }
// Pass inline keyword to optimizer if it appears explicitly on any
// declaration. Also, in the case of -fno-inline attach NoInline
OpenPOWER on IntegriCloud