From b7dd329f2f3ffdb8a1e5ec31e87e94a6038c2073 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Wed, 9 Jul 2014 19:40:08 +0000 Subject: Decouple llvm::SpecialCaseList text representation and its LLVM IR semantics. Turn llvm::SpecialCaseList into a simple class that parses text files in a specified format and knows nothing about LLVM IR. Move this class into LLVMSupport library. Implement two users of this class: * DFSanABIList in DFSan instrumentation pass. * SanitizerBlacklist in Clang CodeGen library. The latter will be modified to use actual source-level information from frontend (source file names) instead of unstable LLVM IR things (LLVM Module identifier). Remove dependency edge from ClangCodeGen/ClangDriver to LLVMTransformUtils. No functionality change. llvm-svn: 212643 --- clang/lib/CodeGen/CodeGenModule.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.h') diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index bb4c010cca4..649b0e54603 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -16,6 +16,7 @@ #include "CGVTables.h" #include "CodeGenTypes.h" +#include "SanitizerBlacklist.h" #include "clang/AST/Attr.h" #include "clang/AST/DeclCXX.h" #include "clang/AST/DeclObjC.h" @@ -31,7 +32,6 @@ #include "llvm/IR/CallingConv.h" #include "llvm/IR/Module.h" #include "llvm/IR/ValueHandle.h" -#include "llvm/Transforms/Utils/SpecialCaseList.h" namespace llvm { class Module; @@ -473,7 +473,7 @@ class CodeGenModule : public CodeGenTypeCache { GlobalDecl initializedGlobalDecl; - std::unique_ptr SanitizerBlacklist; + SanitizerBlacklist SanitizerBL; /// @} public: @@ -1008,8 +1008,8 @@ public: /// annotations are emitted during finalization of the LLVM code. void AddGlobalAnnotations(const ValueDecl *D, llvm::GlobalValue *GV); - const llvm::SpecialCaseList &getSanitizerBlacklist() const { - return *SanitizerBlacklist; + const SanitizerBlacklist &getSanitizerBlacklist() const { + return SanitizerBL; } void reportGlobalToASan(llvm::GlobalVariable *GV, SourceLocation Loc, -- cgit v1.2.3