[Lldb-commits] [PATCH] D58946: [SBAPI] Don't check IsValid in constructor
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 4 18:01:50 PST 2019
JDevlieghere created this revision.
JDevlieghere added reviewers: labath, davide, jingham.
JDevlieghere added a project: LLDB.
Herald added a subscriber: abidh.
When running the test suite with the instrumentation macros, I noticed two lldb-mi tests regressed. The issue was the copy constructor of SBLineEntry. Without the macros the returned value would be elided, but with the macros the copy constructor was called. The latter used `IsValid` to determine whether the underlying opaque pointer should be set. This is likely a remnant of when IsValid would only check the validity of the smart pointer. In SBLineEntry however, it actually forwards to LineEntry::IsValid().
So what happened here was that because of the macros the copy constructor was called. The opaque pointer was valid but the LineEntry didn't consider itself valid. So the copied-to object was default initialized.
This patch replaces all checks for IsValid in copy (assignment) constructors with checks for the opaque pointer itself.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 10386 bytes
Desc: not available
More information about the lldb-commits