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 | 4f45bc099f2665bc6e4bcbb169aa452390dbf3fe (patch) | |
tree | 67a70eeaf5da4ec49baf3ce37ac44bb15eb1c9fb /lib/CodeGen/CodeGenModule.h | |
parent | c79afdae8a2e12d1e8f27a2ae0a43dfca3b8283b (diff) |
[ubsan] Add support for -fsanitize-blacklist
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172808 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | lib/CodeGen/CodeGenModule.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index 00a98a6424..0f011205a7 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/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); |