[compiler-rt] r258881 - [cfi] Exclude __cfi_slowpath_diag from the non-diag rtl.
Evgeniy Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 26 15:42:41 PST 2016
Author: eugenis
Date: Tue Jan 26 17:42:41 2016
New Revision: 258881
URL: http://llvm.org/viewvc/llvm-project?rev=258881&view=rev
Log:
[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.
Modified:
compiler-rt/trunk/lib/cfi/cfi.cc
Modified: compiler-rt/trunk/lib/cfi/cfi.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/cfi/cfi.cc?rev=258881&r1=258880&r2=258881&view=diff
==============================================================================
--- compiler-rt/trunk/lib/cfi/cfi.cc (original)
+++ compiler-rt/trunk/lib/cfi/cfi.cc Tue Jan 26 17:42:41 2016
@@ -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
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
More information about the llvm-commits
mailing list