OSDN Git Service

Add const to "DWARFDie &Die" in a few functions as they can't change the DWARFDie.
authorGreg Clayton <gclayton@apple.com>
Mon, 8 May 2017 21:29:17 +0000 (21:29 +0000)
committerGreg Clayton <gclayton@apple.com>
Mon, 8 May 2017 21:29:17 +0000 (21:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302471 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/DebugInfo/DWARF/DWARFVerifier.h
lib/DebugInfo/DWARF/DWARFVerifier.cpp

index 645eee4..b9f14be 100644 (file)
@@ -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.
index ec5fb08..8a54429 100644 (file)
@@ -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) {