[ASan] move declaration of __asan_default_options to interface header

llvm-svn: 161932
This commit is contained in:
Alexey Samsonov 2012-08-15 07:11:14 +00:00
parent d9401e2e58
commit 682a07cbe1
3 changed files with 7 additions and 8 deletions

View File

@ -23,12 +23,6 @@
// __asan_default_options().
// 3) overriden from env variable ASAN_OPTIONS.
extern "C" {
// Can be overriden by user.
const char *__asan_default_options()
SANITIZER_WEAK_ATTRIBUTE SANITIZER_INTERFACE_ATTRIBUTE;
} // extern "C"
namespace __asan {
struct Flags {

View File

@ -161,6 +161,11 @@ extern "C" {
// Prints accumulated stats to stderr. Used for debugging.
void __asan_print_accumulated_stats()
SANITIZER_INTERFACE_ATTRIBUTE;
} // namespace
// This function may be overriden by user to provide a string containing
// ASan runtime options. See asan_flags.h for details.
const char* __asan_default_options()
SANITIZER_WEAK_ATTRIBUTE SANITIZER_INTERFACE_ATTRIBUTE;
} // extern "C"
#endif // ASAN_INTERFACE_H

View File

@ -49,7 +49,7 @@ rm ./a.out
echo "Checking the presense of interface symbols in compiled file"
$CC -g -faddress-sanitizer -dead_strip -O2 $C_TEST.c
nm ./a.out | grep " T " | sed "s/.* T //" | grep "__asan_" | sed "s/___asan_/__asan_/" > symbols.txt
nm ./a.out | egrep " [TW] " | sed "s/.* T //" | sed "s/.* W //" | grep "__asan_" | sed "s/___asan_/__asan_/" > symbols.txt
cat $ASAN_INTERFACE_H | sed "s/\/\/.*//" | grep "__asan_.*(" | sed "s/.* __asan_/__asan_/;s/(.*//" > interface.txt
for i in __asan_report_{load,store}{1,2,4,8,16}
do