[DWARF] Corrected behavior for when no .apple_names section is present in the object.
The verifier should not output any message in such a case.
Added test case with no .apple_name section in the file to verify new functionality.
Made existing test case more specific.
llvm-svn: 305597
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
index a6240fb..41907e57 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
@@ -279,7 +279,6 @@
bool DWARFVerifier::handleAppleNames() {
NumAppleNamesErrors = 0;
- OS << "Verifying .apple_names...\n";
DataExtractor AppleNamesSection(DCtx.getAppleNamesSection().Data,
DCtx.isLittleEndian(), 0);
@@ -288,10 +287,11 @@
DCtx.getAppleNamesSection().Relocs);
if (!AppleNames.extract()) {
- OS << "error: cannot extract .apple_names accelerator table\n";
- return false;
+ return true;
}
+ OS << "Verifying .apple_names...\n";
+
// Verify that all buckets have a valid hash index or are empty
uint32_t NumBuckets = AppleNames.getNumBuckets();
uint32_t NumHashes = AppleNames.getNumHashes();