sure this should not cause a memory leak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336007
91177308-0d34-0410-b5e6-
96231b3b80d8
/// 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.
///
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) {