aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp')
-rw-r--r--llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp b/llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
index 1e527ab3916e..cdea0e39486d 100644
--- a/llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
+++ b/llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
@@ -310,8 +310,10 @@ static void convertFunctionLineTable(raw_ostream &Log, CUInfo &CUI,
// so break out after printing a warning.
auto FirstLE = FI.OptLineTable->first();
if (FirstLE && *FirstLE == LE) {
- Log << "warning: duplicate line table detected for DIE:\n";
- Die.dump(Log, 0, DIDumpOptions::getForSingleDIE());
+ if (!Gsym.isQuiet()) {
+ Log << "warning: duplicate line table detected for DIE:\n";
+ Die.dump(Log, 0, DIDumpOptions::getForSingleDIE());
+ }
} else {
// Print out (ignore if os == nulls as this is expensive)
Log << "error: line table has addresses that do not "
@@ -390,11 +392,14 @@ void DwarfTransformer::handleDie(raw_ostream &OS, CUInfo &CUI, DWARFDie Die) {
// and the debug info wasn't able to be stripped from the DWARF. If
// the LowPC isn't zero or -1, then we should emit an error.
if (Range.LowPC != 0) {
- // Unexpected invalid address, emit an error
- Log << "warning: DIE has an address range whose start address is "
- "not in any executable sections (" <<
- *Gsym.GetValidTextRanges() << ") and will not be processed:\n";
- Die.dump(Log, 0, DIDumpOptions::getForSingleDIE());
+ if (!Gsym.isQuiet()) {
+ // Unexpected invalid address, emit a warning
+ Log << "warning: DIE has an address range whose start address is "
+ "not in any executable sections ("
+ << *Gsym.GetValidTextRanges()
+ << ") and will not be processed:\n";
+ Die.dump(Log, 0, DIDumpOptions::getForSingleDIE());
+ }
}
break;
}