diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-29 05:13:59 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-29 05:13:59 +0000 |
commit | e5c30122cae6113660c6098301fd22db1693e69a (patch) | |
tree | bda56023e23751537daa70aad32aa0c83565bf97 /lib/Analysis/CFRefCount.cpp | |
parent | dd6cec16e91983651a73ec8a4aadfcfb5bf23fc1 (diff) |
Provide the option to run the CF-retain checker in GC enabled mode.
The transfer functions for the checker don't do anything special yet in GC mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50394 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index ad72d27a82..730c5311f5 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -590,7 +590,8 @@ public: private: // Instance variables. - CFRefSummaryManager Summaries; + CFRefSummaryManager Summaries; + const bool GCEnabled; RefBFactoryTy RefBFactory; UseAfterReleasesTy UseAfterReleases; @@ -636,8 +637,9 @@ private: public: - CFRefCount(ASTContext& Ctx) + CFRefCount(ASTContext& Ctx, bool gcenabled) : Summaries(Ctx), + GCEnabled(gcenabled), RetainSelector(GetUnarySelector("retain", Ctx)), ReleaseSelector(GetUnarySelector("release", Ctx)) {} @@ -1575,6 +1577,6 @@ void Leak::GetErrorNodes(std::vector<ExplodedNode<ValueState>*>& Nodes) { // Transfer function creation for external clients. //===----------------------------------------------------------------------===// -GRTransferFuncs* clang::MakeCFRefCountTF(ASTContext& Ctx) { - return new CFRefCount(Ctx); +GRTransferFuncs* clang::MakeCFRefCountTF(ASTContext& Ctx, bool GCEnabled) { + return new CFRefCount(Ctx, GCEnabled); } |