r176200 - [analyzer] Turn on C++ constructor inlining by default.
Jordan Rose
jordan_rose at apple.com
Wed Feb 27 10:49:43 PST 2013
Author: jrose
Date: Wed Feb 27 12:49:43 2013
New Revision: 176200
URL: http://llvm.org/viewvc/llvm-project?rev=176200&view=rev
Log:
[analyzer] Turn on C++ constructor inlining by default.
This enables constructor inlining for types with non-trivial destructors.
The plan is to enable destructor inlining within the next month, but that
needs further verification.
<rdar://problem/12295329>
Modified:
cfe/trunk/docs/analyzer/IPA.txt
cfe/trunk/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
cfe/trunk/test/Analysis/analyzer-config.cpp
Modified: cfe/trunk/docs/analyzer/IPA.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/analyzer/IPA.txt?rev=176200&r1=176199&r2=176200&view=diff
==============================================================================
--- cfe/trunk/docs/analyzer/IPA.txt (original)
+++ cfe/trunk/docs/analyzer/IPA.txt Wed Feb 27 12:49:43 2013
@@ -46,9 +46,10 @@ Each of these modes implies that all the
inlined as well; it doesn't make sense to inline destructors without inlining
constructors, for example.
-The default c++-inlining mode is 'methods', meaning only regular member
-functions and overloaded operators will be inlined. Note that no C++ member
-functions will be inlined under -analyzer-config ipa=none or
+The default c++-inlining mode is 'constructors', meaning that member functions,
+overloaded operators, and some constructors will be inlined. If a type has a
+non-trivial destructor, however, its constructor will not be inlined. Note that
+no C++ member functions will be inlined under -analyzer-config ipa=none or
-analyzer-config ipa=basic-inlining.
### c++-template-inlining ###
Modified: cfe/trunk/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp?rev=176200&r1=176199&r2=176200&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp Wed Feb 27 12:49:43 2013
@@ -74,7 +74,7 @@ AnalyzerOptions::mayInlineCXXMemberFunct
static const char *ModeKey = "c++-inlining";
StringRef ModeStr(Config.GetOrCreateValue(ModeKey,
- "methods").getValue());
+ "constructors").getValue());
CXXInlineableMemberKind &MutableMode =
const_cast<CXXInlineableMemberKind &>(CXXMemberInliningMode);
Modified: cfe/trunk/test/Analysis/analyzer-config.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/analyzer-config.cpp?rev=176200&r1=176199&r2=176200&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/analyzer-config.cpp (original)
+++ cfe/trunk/test/Analysis/analyzer-config.cpp Wed Feb 27 12:49:43 2013
@@ -11,7 +11,7 @@ public:
};
// CHECK: [config]
-// CHECK-NEXT: c++-inlining = methods
+// CHECK-NEXT: c++-inlining = constructors
// CHECK-NEXT: c++-stdlib-inlining = true
// CHECK-NEXT: c++-template-inlining = true
// CHECK-NEXT: cfg-temporary-dtors = false
More information about the cfe-commits
mailing list