[llvm] r336007 - Pass DWARFUnit to verifier by reference not by value. I am moderately
Paul Robinson via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 29 12:17:44 PDT 2018
Author: probinson
Date: Fri Jun 29 12:17:44 2018
New Revision: 336007
URL: http://llvm.org/viewvc/llvm-project?rev=336007&view=rev
Log:
Pass DWARFUnit to verifier by reference not by value. I am moderately
sure this should not cause a memory leak.
Modified:
llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFVerifier.h
llvm/trunk/lib/DebugInfo/DWARF/DWARFVerifier.cpp
Modified: llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFVerifier.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFVerifier.h?rev=336007&r1=336006&r2=336007&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFVerifier.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFVerifier.h Fri Jun 29 12:17:44 2018
@@ -152,7 +152,7 @@ private:
/// type of the unit DIE.
///
/// \returns true if the content is verified successfully, false otherwise.
- bool verifyUnitContents(DWARFUnit Unit, uint8_t UnitType = 0);
+ bool verifyUnitContents(DWARFUnit &Unit, uint8_t UnitType = 0);
/// Verify that all Die ranges are valid.
///
Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFVerifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFVerifier.cpp?rev=336007&r1=336006&r2=336007&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFVerifier.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFVerifier.cpp Fri Jun 29 12:17:44 2018
@@ -171,7 +171,7 @@ bool DWARFVerifier::verifyUnitHeader(con
return Success;
}
-bool DWARFVerifier::verifyUnitContents(DWARFUnit Unit, uint8_t UnitType) {
+bool DWARFVerifier::verifyUnitContents(DWARFUnit &Unit, uint8_t UnitType) {
uint32_t NumUnitErrors = 0;
unsigned NumDies = Unit.getNumDIEs();
for (unsigned I = 0; I < NumDies; ++I) {
More information about the llvm-commits
mailing list