Handle prefix '_' that may appear in front of the name of 'Release' functions

llvm-svn: 58666
This commit is contained in:
Ted Kremenek 2008-11-04 00:36:12 +00:00
parent eefdcea2ba
commit 24b1d9f57e
1 changed files with 3 additions and 6 deletions

View File

@ -741,6 +741,9 @@ RetainSummary* RetainSummaryManager::getSummary(FunctionDecl* FD) {
break;
}
}
// Ignore the prefix '_'
while (*FName == '_') ++FName;
if (FName[0] == 'C') {
if (FName[1] == 'F')
@ -780,9 +783,6 @@ static bool isRelease(FunctionDecl* FD, const char* FName) {
RetainSummary* RetainSummaryManager::getCFSummary(FunctionDecl* FD,
const char* FName) {
if (FName[0] == 'C' && FName[1] == 'F')
FName += 2;
if (isRetain(FD, FName))
return getUnarySummary(FD, cfretain);
@ -798,9 +798,6 @@ RetainSummary* RetainSummaryManager::getCFSummary(FunctionDecl* FD,
RetainSummary* RetainSummaryManager::getCGSummary(FunctionDecl* FD,
const char* FName) {
if (FName[0] == 'C' && FName[1] == 'G')
FName += 2;
if (isRelease(FD, FName))
return getUnarySummary(FD, cfrelease);