From: Greg Clayton Date: Mon, 8 May 2017 21:29:17 +0000 (+0000) Subject: Add const to "DWARFDie &Die" in a few functions as they can't change the DWARFDie. X-Git-Tag: llvmorg-5.0.0-rc1~5657 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=58a2e0d90b569eb8acf6cfecaeef5fe5ba4aee00;p=platform%2Fupstream%2Fllvm.git Add const to "DWARFDie &Die" in a few functions as they can't change the DWARFDie. llvm-svn: 302471 --- diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h index 645eee4..b9f14be 100644 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h +++ b/llvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h @@ -40,7 +40,7 @@ class DWARFVerifier { /// /// @param Die The DWARF DIE that owns the attribute value /// @param AttrValue The DWARF attribute value to check - void verifyDebugInfoAttribute(DWARFDie &Die, DWARFAttribute &AttrValue); + void verifyDebugInfoAttribute(const DWARFDie &Die, DWARFAttribute &AttrValue); /// Verifies the attribute's DWARF form. /// @@ -51,7 +51,7 @@ class DWARFVerifier { /// /// @param Die The DWARF DIE that owns the attribute value /// @param AttrValue The DWARF attribute value to check - void verifyDebugInfoForm(DWARFDie &Die, DWARFAttribute &AttrValue); + void verifyDebugInfoForm(const DWARFDie &Die, DWARFAttribute &AttrValue); /// Verifies the all valid references that were found when iterating through /// all of the DIE attributes. diff --git a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp index ec5fb08..8a54429 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp @@ -23,7 +23,7 @@ using namespace llvm; using namespace dwarf; using namespace object; -void DWARFVerifier::verifyDebugInfoAttribute(DWARFDie &Die, +void DWARFVerifier::verifyDebugInfoAttribute(const DWARFDie &Die, DWARFAttribute &AttrValue) { const auto Attr = AttrValue.Attr; switch (Attr) { @@ -68,7 +68,7 @@ void DWARFVerifier::verifyDebugInfoAttribute(DWARFDie &Die, } } -void DWARFVerifier::verifyDebugInfoForm(DWARFDie &Die, +void DWARFVerifier::verifyDebugInfoForm(const DWARFDie &Die, DWARFAttribute &AttrValue) { const auto Form = AttrValue.Value.getForm(); switch (Form) {