llvm-project/compiler-rt/lib/dfsan/dfsan.h

35 lines
892 B
C
Raw Normal View History

//===-- dfsan.h -------------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file is a part of DataFlowSanitizer.
//
// Private DFSan header.
//===----------------------------------------------------------------------===//
#ifndef DFSAN_H
#define DFSAN_H
#include "sanitizer/dfsan_interface.h"
namespace __dfsan {
void InitializeInterceptors();
inline dfsan_label *shadow_for(void *ptr) {
return (dfsan_label *) ((((uintptr_t) ptr) & ~0x700000000000) << 1);
}
inline const dfsan_label *shadow_for(const void *ptr) {
return shadow_for(const_cast<void *>(ptr));
}
} // namespace __dfsan
#endif // DFSAN_H