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 | 4d1f422c6feb23a0f7c1f78eff7b5da5001d69ff (patch) | |
tree | 00115908477c2cecc934b9725d5447afd3f6cd41 /clang/lib/Analysis/CFRefCount.cpp | |
parent | e331a65c794c93b7c7792b7ba08ab6069b9c086d (diff) | |
download | bcm5719-llvm-4d1f422c6feb23a0f7c1f78eff7b5da5001d69ff.tar.gz bcm5719-llvm-4d1f422c6feb23a0f7c1f78eff7b5da5001d69ff.zip |
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.
llvm-svn: 50394
Diffstat (limited to 'clang/lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | clang/lib/Analysis/CFRefCount.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp index ad72d27a82f..730c5311f54 100644 --- a/clang/lib/Analysis/CFRefCount.cpp +++ b/clang/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); } |