commit | 3797adb94fdc6b747cb0e97a64b15b931f2533b8 | [log] [tgz] |
---|---|---|
author | Kostya Serebryany <kcc@google.com> | Mon Mar 18 07:33:49 2013 +0000 |
committer | Kostya Serebryany <kcc@google.com> | Mon Mar 18 07:33:49 2013 +0000 |
tree | cf86e5c35d8bcd4211fce8b97e5ce654e3c8d004 | |
parent | 4c16916883c5012e14a84b186cbfee33bfb14027 [diff] |
[asan] don't instrument functions with available_externally linkage. This saves a bit of compile time and reduces the number of redundant global strings generated by asan (https://code.google.com/p/address-sanitizer/issues/detail?id=167) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177250 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp index 2d212d0..758c6e7 100644 --- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -1095,6 +1095,7 @@ bool AddressSanitizer::runOnFunction(Function &F) { if (BL->isIn(F)) return false; if (&F == AsanCtorFunction) return false; + if (F.getLinkage() == GlobalValue::AvailableExternallyLinkage) return false; DEBUG(dbgs() << "ASAN instrumenting:\n" << F << "\n"); initializeCallbacks(*F.getParent());