[llvm] 3782624 - [DebugInfo] Remove hasInterestingContent (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 1 22:50:42 PST 2022


Author: Kazu Hirata
Date: 2022-01-01T22:50:26-08:00
New Revision: 3782624c126bc0cbf81f5251ef206ccf63cce7f2

URL: https://github.com/llvm/llvm-project/commit/3782624c126bc0cbf81f5251ef206ccf63cce7f2
DIFF: https://github.com/llvm/llvm-project/commit/3782624c126bc0cbf81f5251ef206ccf63cce7f2.diff

LOG: [DebugInfo] Remove hasInterestingContent (NFC)

hasInterestingContent was introduced without a use on Sep 15, 2015 in
commit e5162dba49890d9d436ea99d003c792897c9b880.

Added: 
    

Modified: 
    llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h
    llvm/lib/DWARFLinker/DWARFLinker.cpp
    llvm/lib/DWARFLinker/DWARFLinkerCompileUnit.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h b/llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h
index a6310bcb5df12..afba19ac7d42b 100644
--- a/llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h
+++ b/llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h
@@ -148,9 +148,6 @@ class CompileUnit {
     return LocationAttributes;
   }
 
-  void setHasInterestingContent() { HasInterestingContent = true; }
-  bool hasInterestingContent() { return HasInterestingContent; }
-
   /// Mark every DIE in this unit as kept. This function also
   /// marks variables as InDebugMap so that they appear in the
   /// reconstructed accelerator tables.
@@ -298,9 +295,6 @@ class CompileUnit {
   /// Is this unit subject to the ODR rule?
   bool HasODR;
 
-  /// Did a DIE actually contain a valid reloc?
-  bool HasInterestingContent;
-
   /// The DW_AT_language of this unit.
   uint16_t Language = 0;
 

diff  --git a/llvm/lib/DWARFLinker/DWARFLinker.cpp b/llvm/lib/DWARFLinker/DWARFLinker.cpp
index ae0859e1ecfdf..4cc146e086f9c 100644
--- a/llvm/lib/DWARFLinker/DWARFLinker.cpp
+++ b/llvm/lib/DWARFLinker/DWARFLinker.cpp
@@ -2107,7 +2107,6 @@ Error DWARFLinker::loadClangModule(
       // Add this module.
       Unit = std::make_unique<CompileUnit>(*CU, UnitID++, !Options.NoODR,
                                            ModuleName);
-      Unit->setHasInterestingContent();
       analyzeContextInfo(CUDie, 0, *Unit, &ODRContexts.getRoot(), ODRContexts,
                          ModulesEndOffset, Options.ParseableSwiftInterfaces,
                          [&](const Twine &Warning, const DWARFDie &DIE) {

diff  --git a/llvm/lib/DWARFLinker/DWARFLinkerCompileUnit.cpp b/llvm/lib/DWARFLinker/DWARFLinkerCompileUnit.cpp
index 925ab3d295c25..acecb1788d104 100644
--- a/llvm/lib/DWARFLinker/DWARFLinkerCompileUnit.cpp
+++ b/llvm/lib/DWARFLinker/DWARFLinkerCompileUnit.cpp
@@ -40,8 +40,6 @@ StringRef CompileUnit::getSysRoot() {
 void CompileUnit::markEverythingAsKept() {
   unsigned Idx = 0;
 
-  setHasInterestingContent();
-
   for (auto &I : Info) {
     // Mark everything that wasn't explicit marked for pruning.
     I.Keep = !I.Prune;


        


More information about the llvm-commits mailing list