Skip to content

Commit e58aa29

Browse files
committed
Add assert and fix comment
1 parent ca7300c commit e58aa29

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ llvm::StringRef SymbolFileDWARFDebugMap::GetPluginDescriptionStatic() {
246246
}
247247

248248
SymbolFile *SymbolFileDWARFDebugMap::CreateInstance(ObjectFileSP objfile_sp) {
249+
assert(objfile_sp);
249250
// Don't create a debug map if the object file isn't a Mach-O.
250251
if (!objfile_sp->GetArchitecture().GetTriple().isAppleMachO())
251252
return nullptr;

lldb/unittests/SymbolFile/DWARF/SymbolFileDWARFDebugMapTests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ TEST_F(SymbolFileDWARFDebugMapTests, CreateInstanceReturnNonNullForMachOFile) {
7373
...
7474
)";
7575

76-
// Set up
76+
// Perform setup.
7777
llvm::Expected<TestFile> file = TestFile::fromYaml(yamldata);
7878
EXPECT_THAT_EXPECTED(file, llvm::Succeeded());
7979
auto module_sp = std::make_shared<Module>(file->moduleSpec());
@@ -139,7 +139,7 @@ TEST_F(SymbolFileDWARFDebugMapTests, CreateInstanceReturnNullForNonMachOFile) {
139139
Length: 0
140140
)";
141141

142-
// Set up
142+
// Perform setup.
143143
llvm::Expected<TestFile> file = TestFile::fromYaml(yamldata);
144144
EXPECT_THAT_EXPECTED(file, llvm::Succeeded());
145145
auto module_sp = std::make_shared<Module>(file->moduleSpec());

0 commit comments

Comments
 (0)