llvm-project/lldb/source/API
Jonas Devlieghere bd4bf82a48 [SBAPI] Don't check IsValid in constructor
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 using ::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 ended up default
initialized.

This patch replaces all checks for IsValid in copy (assignment)
constructors with checks for the opaque pointer itself.

Differential revision: https://reviews.llvm.org/D58946

llvm-svn: 355458
2019-03-06 00:05:55 +00:00
..
CMakeLists.txt [build] Rename clang-headers to clang-resource-headers 2019-03-04 21:19:53 +00:00
SBAddress.cpp [SBAPI] Don't check IsValid in constructor 2019-03-06 00:05:55 +00:00
SBAttachInfo.cpp [SBAPI] Don't check IsValid in constructor 2019-03-06 00:05:55 +00:00
SBBlock.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBBreakpoint.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBBreakpointLocation.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBBreakpointName.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBBreakpointOptionCommon.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBBreakpointOptionCommon.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBBroadcaster.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBCommandInterpreter.cpp Use std::make_shared in LLDB (NFC) 2019-02-11 23:13:08 +00:00
SBCommandReturnObject.cpp [SBAPI] Don't check IsValid in constructor 2019-03-06 00:05:55 +00:00
SBCommunication.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBCompileUnit.cpp Revert logging addition to SBCompileUnit::GetNumLineEntries, 2019-03-05 22:17:47 +00:00
SBData.cpp Use std::make_shared in LLDB (NFC) 2019-02-11 23:13:08 +00:00
SBDebugger.cpp [Reproducers] Capture and replay interpreter commands. 2019-03-02 00:20:26 +00:00
SBDeclaration.cpp [SBAPI] Don't check IsValid in constructor 2019-03-06 00:05:55 +00:00
SBError.cpp [SBAPI] Don't check IsValid in constructor 2019-03-06 00:05:55 +00:00
SBEvent.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBExecutionContext.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBExpressionOptions.cpp [SBAPI] Don't check IsValid in constructor 2019-03-06 00:05:55 +00:00
SBFileSpec.cpp [SBAPI] Don't check IsValid in constructor 2019-03-06 00:05:55 +00:00
SBFileSpecList.cpp [SBAPI] Don't check IsValid in constructor 2019-03-06 00:05:55 +00:00
SBFrame.cpp [SBAPI] Don't check IsValid in constructor 2019-03-06 00:05:55 +00:00
SBFunction.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBHostOS.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBInstruction.cpp Use std::make_shared in LLDB (NFC) 2019-02-11 23:13:08 +00:00
SBInstructionList.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBLanguageRuntime.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBLaunchInfo.cpp Move FileAction, ProcessInfo and ProcessLaunchInfo from Target to Host 2019-02-04 14:28:08 +00:00
SBLineEntry.cpp [SBAPI] Don't check IsValid in constructor 2019-03-06 00:05:55 +00:00
SBListener.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBMemoryRegionInfo.cpp [SBAPI] Don't check IsValid in constructor 2019-03-06 00:05:55 +00:00
SBMemoryRegionInfoList.cpp Replace 'ap' with 'up' suffix in variable names. (NFC) 2019-02-13 06:25:41 +00:00
SBModule.cpp Replace 'ap' with 'up' suffix in variable names. (NFC) 2019-02-13 06:25:41 +00:00
SBModuleSpec.cpp [SBAPI] Don't check IsValid in constructor 2019-03-06 00:05:55 +00:00
SBPlatform.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBProcess.cpp Move ProcessInfo from Host to Utility. 2019-03-04 21:51:03 +00:00
SBProcessInfo.cpp [SBAPI] Don't check IsValid in constructor 2019-03-06 00:05:55 +00:00
SBQueue.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBQueueItem.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBReproducer.cpp [Reproducers] Initialize reproducers before initializing the debugger. 2019-02-21 22:26:16 +00:00
SBReproducerPrivate.h [Reprodicuers] Check initialization 2019-02-28 00:49:57 +00:00
SBSection.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBSourceManager.cpp Replace 'ap' with 'up' suffix in variable names. (NFC) 2019-02-13 06:25:41 +00:00
SBStream.cpp Replace 'ap' with 'up' suffix in variable names. (NFC) 2019-02-13 06:25:41 +00:00
SBStringList.cpp [SBAPI] Don't check IsValid in constructor 2019-03-06 00:05:55 +00:00
SBStructuredData.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBSymbol.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBSymbolContext.cpp [SBAPI] Don't check IsValid in constructor 2019-03-06 00:05:55 +00:00
SBSymbolContextList.cpp [SBAPI] Don't check IsValid in constructor 2019-03-06 00:05:55 +00:00
SBTarget.cpp Move ProcessInfo from Host to Utility. 2019-03-04 21:51:03 +00:00
SBThread.cpp [SBAPI] Don't check IsValid in constructor 2019-03-06 00:05:55 +00:00
SBThreadCollection.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBThreadPlan.cpp Use std::make_shared in LLDB (NFC) 2019-02-11 23:13:08 +00:00
SBTrace.cpp Use std::make_shared in LLDB (NFC) 2019-02-11 23:13:08 +00:00
SBTraceOptions.cpp Use std::make_shared in LLDB (NFC) 2019-02-11 23:13:08 +00:00
SBType.cpp Replace 'ap' with 'up' suffix in variable names. (NFC) 2019-02-13 06:25:41 +00:00
SBTypeCategory.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBTypeEnumMember.cpp [SBAPI] Don't check IsValid in constructor 2019-03-06 00:05:55 +00:00
SBTypeFilter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBTypeFormat.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBTypeNameSpecifier.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBTypeSummary.cpp [SBAPI] Don't check IsValid in constructor 2019-03-06 00:05:55 +00:00
SBTypeSynthetic.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBUnixSignals.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBValue.cpp Use std::make_shared in LLDB (NFC) 2019-02-11 23:13:08 +00:00
SBValueList.cpp Replace 'ap' with 'up' suffix in variable names. (NFC) 2019-02-13 06:25:41 +00:00
SBVariablesOptions.cpp Replace 'ap' with 'up' suffix in variable names. (NFC) 2019-02-13 06:25:41 +00:00
SBWatchpoint.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SystemInitializerFull.cpp [Reproducers] Initialize reproducers before initializing the debugger. 2019-02-21 22:26:16 +00:00
SystemInitializerFull.h [Reproducers] Initialize reproducers before initializing the debugger. 2019-02-21 22:26:16 +00:00
Utils.h [SBAPI] Don't check IsValid in constructor 2019-03-06 00:05:55 +00:00
liblldb-private.exports Limit LLDB_EXPORT_ALL_SYMBOLS to lldb symbols 2016-10-29 00:29:15 +00:00
liblldb.exports Fix OSX cmake build 2016-02-18 17:01:40 +00:00
liblldb.xcode.exports Only export public symbols with the cmake build. 2015-09-04 00:00:41 +00:00