diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2013-08-12 23:51:33 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2013-08-12 23:51:33 +0000 |
commit | fa9f5aef0583535f3ac1fa444f2cf62db324537e (patch) | |
tree | 10613e639be941f0d8bab5eaffa2578135e82ab9 /lib/dfsan/dfsan.cc | |
parent | 249cdca5989af3b55e42460283ca63096aeddfeb (diff) |
[dfsan] Begin a private header and move shadow_for there.
Differential Revision: http://llvm-reviews.chandlerc.com/D1348
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188231 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/dfsan/dfsan.cc')
-rw-r--r-- | lib/dfsan/dfsan.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/dfsan/dfsan.cc b/lib/dfsan/dfsan.cc index de9137887..02f64deeb 100644 --- a/lib/dfsan/dfsan.cc +++ b/lib/dfsan/dfsan.cc @@ -24,6 +24,10 @@ #include "sanitizer_common/sanitizer_common.h" #include "sanitizer_common/sanitizer_libc.h" +#include "dfsan/dfsan.h" + +using namespace __dfsan; + typedef atomic_uint16_t atomic_dfsan_label; static const dfsan_label kInitializingLabel = -1; @@ -68,10 +72,6 @@ static atomic_dfsan_label *union_table(dfsan_label l1, dfsan_label l2) { return &(*(dfsan_union_table_t *) kUnionTableAddr)[l1][l2]; } -static dfsan_label *shadow_for(void *ptr) { - return (dfsan_label *) ((((uintptr_t) ptr) & ~0x700000000000) << 1); -} - // Resolves the union of two unequal labels. Nonequality is a precondition for // this function (the instrumentation pass inlines the equality test). extern "C" SANITIZER_INTERFACE_ATTRIBUTE |