summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2014-10-15 22:17:27 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2014-10-15 22:17:27 +0000
commit0b15e34bd15e24d6f52bfc259a44e0d149cbf54b (patch)
treecc9c6972c90ab959b68b370638b2849843cce2a5 /clang/lib/CodeGen/CodeGenModule.cpp
parent026aa4962af114dc574f67dc211fb01ff23dc966 (diff)
downloadbcm5719-llvm-0b15e34bd15e24d6f52bfc259a44e0d149cbf54b.tar.gz
bcm5719-llvm-0b15e34bd15e24d6f52bfc259a44e0d149cbf54b.zip
Move SanitizerBlacklist object from CodeGenModule to ASTContext.
Soon we'll need to have access to blacklist before the CodeGen phase (see http://reviews.llvm.org/D5687), so parse and construct the blacklist earlier. llvm-svn: 219857
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 587fc139150..f8db0eeaf86 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -89,9 +89,7 @@ CodeGenModule::CodeGenModule(ASTContext &C, const CodeGenOptions &CGO,
NSConcreteStackBlock(nullptr), BlockObjectAssign(nullptr),
BlockObjectDispose(nullptr), BlockDescriptorType(nullptr),
GenericBlockLiteralType(nullptr), LifetimeStartFn(nullptr),
- LifetimeEndFn(nullptr), SanitizerBL(llvm::SpecialCaseList::createOrDie(
- LangOpts.Sanitize.BlacklistFile)),
- SanitizerMD(new SanitizerMetadata(*this)) {
+ LifetimeEndFn(nullptr), SanitizerMD(new SanitizerMetadata(*this)) {
// Initialize the type cache.
llvm::LLVMContext &LLVMContext = M.getContext();
@@ -743,7 +741,7 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D,
B.addAttribute(llvm::Attribute::StackProtectReq);
// Add sanitizer attributes if function is not blacklisted.
- if (!SanitizerBL.isIn(*F)) {
+ if (!getSanitizerBlacklist().isIn(*F)) {
// When AddressSanitizer is enabled, set SanitizeAddress attribute
// unless __attribute__((no_sanitize_address)) is used.
if (LangOpts.Sanitize.Address && !D->hasAttr<NoSanitizeAddressAttr>())
OpenPOWER on IntegriCloud