diff options
author | Qin Zhao <zhaoqin@google.com> | 2016-05-31 21:27:39 +0000 |
---|---|---|
committer | Qin Zhao <zhaoqin@google.com> | 2016-05-31 21:27:39 +0000 |
commit | 965efde6608e651c6cf6501669bb3ea77647bacc (patch) | |
tree | f7fc1c9d7b7bcf7d315065a951ed7d18c2db527c /lib/esan/esan.cpp | |
parent | a5b0723993ed5f049539a8098cd1c43963743279 (diff) |
[esan|cfrag] Add the skeleton to handle the cfrag argument
Summary:
Adds the struct declaration for the cache-fragmentation tool variable
passed to the runtime library.
Updates test struct-simple.cpp.
Reviewers: aizatsky, bruening
Subscribers: filcab, kubabrecka, bruening, kcc, vitalybuka, eugenis, llvm-commits, zhaoqin
Differential Revision: http://reviews.llvm.org/D20542
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271337 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/esan/esan.cpp')
-rw-r--r-- | lib/esan/esan.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/esan/esan.cpp b/lib/esan/esan.cpp index f0a496518..1f116da08 100644 --- a/lib/esan/esan.cpp +++ b/lib/esan/esan.cpp @@ -219,7 +219,10 @@ int finalizeLibrary() { void processCompilationUnitInit(void *Ptr) { VPrintf(2, "in esan::%s\n", __FUNCTION__); if (WhichTool == ESAN_CacheFrag) { + DCHECK(Ptr != nullptr); processCacheFragCompilationUnitInit(Ptr); + } else { + DCHECK(Ptr == nullptr); } } @@ -228,7 +231,10 @@ void processCompilationUnitInit(void *Ptr) { void processCompilationUnitExit(void *Ptr) { VPrintf(2, "in esan::%s\n", __FUNCTION__); if (WhichTool == ESAN_CacheFrag) { + DCHECK(Ptr != nullptr); processCacheFragCompilationUnitExit(Ptr); + } else { + DCHECK(Ptr == nullptr); } } |