From ab9d506be36eb48f60d982ecbf8636f4b43a3399 Mon Sep 17 00:00:00 2001 From: Alexey Lapshin Date: Thu, 19 Aug 2021 14:19:07 +0300 Subject: [PATCH] [DWARF][Verifier][NFC] Use reference to DWARFAddressRangesVector to avoid copying. Avoid copying while access to RangesOrError.get(). --- llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp index c6e414a8..bbf5e69 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp @@ -401,7 +401,7 @@ unsigned DWARFVerifier::verifyDieRanges(const DWARFDie &Die, return NumErrors; } - DWARFAddressRangesVector Ranges = RangesOrError.get(); + const DWARFAddressRangesVector &Ranges = RangesOrError.get(); // Build RI for this DIE and check that ranges within this DIE do not // overlap. DieRangeInfo RI(Die); -- 2.7.4