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.