mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 05:26:06 +00:00
[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:
parent
f8e58016f6
commit
4587b28758
@ -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 ###
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user