using startswith instead of find.

llvm-svn: 281617
This commit is contained in:
Etienne Bergeron 2016-09-15 15:19:19 +00:00
parent 8ddf07cc54
commit c0669ce984
2 changed files with 2 additions and 2 deletions

View File

@ -1883,7 +1883,7 @@ bool AddressSanitizer::runOnFunction(Function &F) {
if (&F == AsanCtorFunction) return false;
if (F.getLinkage() == GlobalValue::AvailableExternallyLinkage) return false;
if (!ClDebugFunc.empty() && ClDebugFunc == F.getName()) return false;
if (F.getName().find("__asan_") != std::string::npos) return false;
if (F.getName().startswith("__asan_") != std::string::npos) return false;
// If needed, insert __asan_init before checking for SanitizeAddress attr.
// This function needs to be called even if the function body is not

View File

@ -21,4 +21,4 @@ entry:
ret i32 0
}
; CHECK: declare void @__asan_init()
; CHECK: declare void @__asan_init()