[ubsan] Give entry methods default (not hidden) visibility.

Fixes using ubsan on shared libraries in linux, for example.

llvm-svn: 172041
This commit is contained in:
Will Dietz 2013-01-10 03:37:30 +00:00
parent 2ca8e7d733
commit e4b1d2e32c
2 changed files with 6 additions and 0 deletions

View File

@ -25,7 +25,9 @@ struct TypeMismatchData {
};
#define RECOVERABLE(checkname, ...) \
SANITIZER_INTERFACE_ATTRIBUTE \
extern "C" void __ubsan_handle_ ## checkname( __VA_ARGS__ ); \
SANITIZER_INTERFACE_ATTRIBUTE \
extern "C" void __ubsan_handle_ ## checkname ## _abort( __VA_ARGS__ );
/// \brief Handle a runtime type check failure, caused by either a misaligned
@ -70,8 +72,10 @@ struct UnreachableData {
};
/// \brief Handle a __builtin_unreachable which is reached.
SANITIZER_INTERFACE_ATTRIBUTE
extern "C" void __ubsan_handle_builtin_unreachable(UnreachableData *Data);
/// \brief Handle reaching the end of a value-returning function.
SANITIZER_INTERFACE_ATTRIBUTE
extern "C" void __ubsan_handle_missing_return(UnreachableData *Data);
struct VLABoundData {

View File

@ -28,8 +28,10 @@ struct DynamicTypeCacheMissData {
/// \brief Handle a runtime type check failure, caused by an incorrect vptr.
/// When this handler is called, all we know is that the type was not in the
/// cache; this does not necessarily imply the existence of a bug.
SANITIZER_INTERFACE_ATTRIBUTE
extern "C" void __ubsan_handle_dynamic_type_cache_miss(
DynamicTypeCacheMissData *Data, ValueHandle Pointer, ValueHandle Hash);
SANITIZER_INTERFACE_ATTRIBUTE
extern "C" void __ubsan_handle_dynamic_type_cache_miss_abort(
DynamicTypeCacheMissData *Data, ValueHandle Pointer, ValueHandle Hash);