summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/cfi
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2016-01-26 23:42:41 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2016-01-26 23:42:41 +0000
commita25dde68d94d2092736b2cd4845940fc98a2f88a (patch)
tree461f407df7b0808e5403b493331e248dfa7ecc59 /compiler-rt/lib/cfi
parentc5f41a34e505230ada3602e40626915a11a93a75 (diff)
downloadbcm5719-llvm-a25dde68d94d2092736b2cd4845940fc98a2f88a.tar.gz
bcm5719-llvm-a25dde68d94d2092736b2cd4845940fc98a2f88a.zip
[cfi] Exclude __cfi_slowpath_diag from the non-diag rtl.
Calls to __cfi_slowpath_diag are only emitted when building with diagnostics, and linking the diag rtl. llvm-svn: 258881
Diffstat (limited to 'compiler-rt/lib/cfi')
-rw-r--r--compiler-rt/lib/cfi/cfi.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler-rt/lib/cfi/cfi.cc b/compiler-rt/lib/cfi/cfi.cc
index b5fbab3875f..fd9b5489eb7 100644
--- a/compiler-rt/lib/cfi/cfi.cc
+++ b/compiler-rt/lib/cfi/cfi.cc
@@ -296,7 +296,7 @@ void ExitLoader() {
}
ALWAYS_INLINE void CfiSlowPathCommon(u64 CallSiteTypeId, void *Ptr,
- void *DiagData) {
+ void *DiagData) {
uptr Addr = (uptr)Ptr;
VReport(3, "__cfi_slowpath: %llx, %p\n", CallSiteTypeId, Ptr);
ShadowValue sv = ShadowValue::load(Addr);
@@ -362,10 +362,12 @@ __cfi_slowpath(u64 CallSiteTypeId, void *Ptr) {
CfiSlowPathCommon(CallSiteTypeId, Ptr, nullptr);
}
+#ifdef CFI_ENABLE_DIAG
extern "C" SANITIZER_INTERFACE_ATTRIBUTE void
__cfi_slowpath_diag(u64 CallSiteTypeId, void *Ptr, void *DiagData) {
CfiSlowPathCommon(CallSiteTypeId, Ptr, DiagData);
}
+#endif
// Setup shadow for dlopen()ed libraries.
// The actual shadow setup happens after dlopen() returns, which means that
OpenPOWER on IntegriCloud