summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-11-04 00:36:12 +0000
committerTed Kremenek <kremenek@apple.com>2008-11-04 00:36:12 +0000
commit24b1d9f57e47f08b63beb28781c50017c544cc3e (patch)
treef1c14c2b3d0f5d8e178eff96aabc2c55da60502b
parenteefdcea2ba0fe2352eb088081f75f85335f66024 (diff)
downloadbcm5719-llvm-24b1d9f57e47f08b63beb28781c50017c544cc3e.tar.gz
bcm5719-llvm-24b1d9f57e47f08b63beb28781c50017c544cc3e.zip
Handle prefix '_' that may appear in front of the name of 'Release' functions
llvm-svn: 58666
-rw-r--r--clang/lib/Analysis/CFRefCount.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp
index 25466cbf622..80c6bf95324 100644
--- a/clang/lib/Analysis/CFRefCount.cpp
+++ b/clang/lib/Analysis/CFRefCount.cpp
@@ -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);
OpenPOWER on IntegriCloud