diff options
author | Will Dietz <wdietz2@illinois.edu> | 2013-01-18 11:30:38 +0000 |
---|---|---|
committer | Will Dietz <wdietz2@illinois.edu> | 2013-01-18 11:30:38 +0000 |
commit | f54319c891d806e410ac09caac35462cf95b8cce (patch) | |
tree | 195d8af1cea50e7be3e52d45a6c116ed7c578ef3 /clang/lib/CodeGen/CodeGenModule.h | |
parent | 63c36bbe5e0ae8d64df8c2a3be6c0b072febdc9a (diff) | |
download | bcm5719-llvm-f54319c891d806e410ac09caac35462cf95b8cce.tar.gz bcm5719-llvm-f54319c891d806e410ac09caac35462cf95b8cce.zip |
[ubsan] Add support for -fsanitize-blacklist
llvm-svn: 172808
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 00a98a6424d..0f011205a73 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -30,6 +30,7 @@ #include "llvm/ADT/StringMap.h" #include "llvm/IR/Module.h" #include "llvm/Support/ValueHandle.h" +#include "llvm/Transforms/Utils/BlackList.h" namespace llvm { class Module; @@ -209,7 +210,7 @@ struct ARCEntrypoints { /// a call will be immediately retain. llvm::InlineAsm *retainAutoreleasedReturnValueMarker; }; - + /// CodeGenModule - This class organizes the cross-function state that is used /// while generating LLVM code. class CodeGenModule : public CodeGenTypeCache { @@ -364,9 +365,13 @@ class CodeGenModule : public CodeGenTypeCache { struct { int GlobalUniqueCount; } Block; - + GlobalDecl initializedGlobalDecl; + llvm::BlackList SanitizerBlacklist; + + const SanitizerOptions &SanOpts; + /// @} public: CodeGenModule(ASTContext &C, const CodeGenOptions &CodeGenOpts, @@ -889,6 +894,12 @@ public: /// annotations are emitted during finalization of the LLVM code. void AddGlobalAnnotations(const ValueDecl *D, llvm::GlobalValue *GV); + const llvm::BlackList &getSanitizerBlacklist() const { + return SanitizerBlacklist; + } + + const SanitizerOptions &getSanOpts() const { return SanOpts; } + private: llvm::GlobalValue *GetGlobalValue(StringRef Ref); |