[cfe-commits] r173384 - in /cfe/trunk: include/clang/StaticAnalyzer/Core/AnalyzerOptions.h lib/StaticAnalyzer/Core/AnalyzerOptions.cpp lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
Anna Zaks
ganna at apple.com
Thu Jan 24 15:15:25 PST 2013
Author: zaks
Date: Thu Jan 24 17:15:25 2013
New Revision: 173384
URL: http://llvm.org/viewvc/llvm-project?rev=173384&view=rev
Log:
[analyzer] refactor: access IPAMode through the accessor.
Modified:
cfe/trunk/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
cfe/trunk/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h?rev=173384&r1=173383&r2=173384&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h Thu Jan 24 17:15:25 2013
@@ -210,6 +210,10 @@
int getOptionAsInteger(StringRef Name, int DefaultVal);
public:
+ AnalysisIPAMode getIPAMode() const {
+ return IPAMode;
+ }
+
/// Returns the option controlling which C++ member functions will be
/// considered for inlining.
///
Modified: cfe/trunk/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp?rev=173384&r1=173383&r2=173384&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp Thu Jan 24 17:15:25 2013
@@ -22,7 +22,7 @@
bool
AnalyzerOptions::mayInlineCXXMemberFunction(CXXInlineableMemberKind K) {
- if (IPAMode < Inlining)
+ if (getIPAMode() < Inlining)
return false;
if (!CXXMemberInliningMode) {
Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp?rev=173384&r1=173383&r2=173384&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp Thu Jan 24 17:15:25 2013
@@ -558,8 +558,9 @@
case CE_ObjCMessage:
if (!Opts.mayInlineObjCMethod())
return false;
- if (!(getAnalysisManager().options.IPAMode == DynamicDispatch ||
- getAnalysisManager().options.IPAMode == DynamicDispatchBifurcate))
+ AnalyzerOptions &Options = getAnalysisManager().options;
+ if (!(Options.getIPAMode() == DynamicDispatch ||
+ Options.getIPAMode() == DynamicDispatchBifurcate))
return false;
break;
}
@@ -737,14 +738,16 @@
const Decl *D = RD.getDecl();
if (D) {
if (RD.mayHaveOtherDefinitions()) {
+ AnalyzerOptions &Options = getAnalysisManager().options;
+
// Explore with and without inlining the call.
- if (getAnalysisManager().options.IPAMode == DynamicDispatchBifurcate) {
+ if (Options.getIPAMode() == DynamicDispatchBifurcate) {
BifurcateCall(RD.getDispatchRegion(), *Call, D, Bldr, Pred);
return;
}
// Don't inline if we're not in any dynamic dispatch mode.
- if (getAnalysisManager().options.IPAMode != DynamicDispatch) {
+ if (Options.getIPAMode() != DynamicDispatch) {
conservativeEvalCall(*Call, Bldr, Pred, State);
return;
}
More information about the cfe-commits
mailing list