[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>

llvm-svn: 176200
This commit is contained in:
Jordan Rose 2013-02-27 18:49:43 +00:00
parent f8e58016f6
commit 4587b28758
3 changed files with 6 additions and 5 deletions

View File

@ -46,9 +46,10 @@ Each of these modes implies that all the previous member function kinds will be
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 ###

View File

@ -74,7 +74,7 @@ AnalyzerOptions::mayInlineCXXMemberFunction(CXXInlineableMemberKind K) {
static const char *ModeKey = "c++-inlining";
StringRef ModeStr(Config.GetOrCreateValue(ModeKey,
"methods").getValue());
"constructors").getValue());
CXXInlineableMemberKind &MutableMode =
const_cast<CXXInlineableMemberKind &>(CXXMemberInliningMode);

View File

@ -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