diff options
| author | Kostya Serebryany <kcc@google.com> | 2014-04-14 11:16:53 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2014-04-14 11:16:53 +0000 |
| commit | 90527cb3249f353ac0f67d923c484ee949e3c939 (patch) | |
| tree | e528f53d6be1b62dbdd8567f93270bb47b4e85b9 /compiler-rt/lib | |
| parent | c0d606a584596039532a3770c5c65529bc18d47e (diff) | |
| download | bcm5719-llvm-90527cb3249f353ac0f67d923c484ee949e3c939.tar.gz bcm5719-llvm-90527cb3249f353ac0f67d923c484ee949e3c939.zip | |
[asan] don't use bool in public interface, make sure the interface headers are usable in plain C
llvm-svn: 206160
Diffstat (limited to 'compiler-rt/lib')
| -rw-r--r-- | compiler-rt/lib/asan/asan_allocator2.cc | 2 | ||||
| -rw-r--r-- | compiler-rt/lib/asan/asan_interface_internal.h | 6 | ||||
| -rw-r--r-- | compiler-rt/lib/asan/asan_poisoning.cc | 2 | ||||
| -rw-r--r-- | compiler-rt/lib/asan/asan_report.cc | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/compiler-rt/lib/asan/asan_allocator2.cc b/compiler-rt/lib/asan/asan_allocator2.cc index a759b8e35b9..ea0ffbe1c0e 100644 --- a/compiler-rt/lib/asan/asan_allocator2.cc +++ b/compiler-rt/lib/asan/asan_allocator2.cc @@ -799,7 +799,7 @@ uptr __asan_get_estimated_allocated_size(uptr size) { return size; } -bool __asan_get_ownership(const void *p) { +int __asan_get_ownership(const void *p) { uptr ptr = reinterpret_cast<uptr>(p); return (AllocationSize(ptr) > 0); } diff --git a/compiler-rt/lib/asan/asan_interface_internal.h b/compiler-rt/lib/asan/asan_interface_internal.h index 15d4b60ef5c..ce71eed8110 100644 --- a/compiler-rt/lib/asan/asan_interface_internal.h +++ b/compiler-rt/lib/asan/asan_interface_internal.h @@ -77,7 +77,7 @@ extern "C" { void __asan_unpoison_memory_region(void const volatile *addr, uptr size); SANITIZER_INTERFACE_ATTRIBUTE - bool __asan_address_is_poisoned(void const volatile *addr); + int __asan_address_is_poisoned(void const volatile *addr); SANITIZER_INTERFACE_ATTRIBUTE uptr __asan_region_is_poisoned(uptr beg, uptr size); @@ -87,7 +87,7 @@ extern "C" { SANITIZER_INTERFACE_ATTRIBUTE void __asan_report_error(uptr pc, uptr bp, uptr sp, - uptr addr, bool is_write, uptr access_size); + uptr addr, int is_write, uptr access_size); SANITIZER_INTERFACE_ATTRIBUTE int __asan_set_error_exit_code(int exit_code); @@ -102,7 +102,7 @@ extern "C" { SANITIZER_INTERFACE_ATTRIBUTE uptr __asan_get_estimated_allocated_size(uptr size); - SANITIZER_INTERFACE_ATTRIBUTE bool __asan_get_ownership(const void *p); + SANITIZER_INTERFACE_ATTRIBUTE int __asan_get_ownership(const void *p); SANITIZER_INTERFACE_ATTRIBUTE uptr __asan_get_allocated_size(const void *p); SANITIZER_INTERFACE_ATTRIBUTE uptr __asan_get_current_allocated_bytes(); SANITIZER_INTERFACE_ATTRIBUTE uptr __asan_get_heap_size(); diff --git a/compiler-rt/lib/asan/asan_poisoning.cc b/compiler-rt/lib/asan/asan_poisoning.cc index 0e1d2baf6ae..f75ac0a4ed4 100644 --- a/compiler-rt/lib/asan/asan_poisoning.cc +++ b/compiler-rt/lib/asan/asan_poisoning.cc @@ -146,7 +146,7 @@ void __asan_unpoison_memory_region(void const volatile *addr, uptr size) { } } -bool __asan_address_is_poisoned(void const volatile *addr) { +int __asan_address_is_poisoned(void const volatile *addr) { return __asan::AddressIsPoisoned((uptr)addr); } diff --git a/compiler-rt/lib/asan/asan_report.cc b/compiler-rt/lib/asan/asan_report.cc index c50df27cdb0..9d174220298 100644 --- a/compiler-rt/lib/asan/asan_report.cc +++ b/compiler-rt/lib/asan/asan_report.cc @@ -797,8 +797,8 @@ void ReportMacCfReallocUnknown( // --------------------------- Interface --------------------- {{{1 using namespace __asan; // NOLINT -void __asan_report_error(uptr pc, uptr bp, uptr sp, - uptr addr, bool is_write, uptr access_size) { +void __asan_report_error(uptr pc, uptr bp, uptr sp, uptr addr, int is_write, + uptr access_size) { ScopedInErrorReport in_report; // Determine the error type. |

