[llvm] c101415 - [DebugInfo] Remove an unnecessary cast (NFC) (#146217)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 28 13:03:41 PDT 2025


Author: Kazu Hirata
Date: 2025-06-28T13:03:38-07:00
New Revision: c101415820f24dee313f1482e7dbbd3a372984e7

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

LOG: [DebugInfo] Remove an unnecessary cast (NFC) (#146217)

Added: 
    

Modified: 
    llvm/lib/DebugInfo/LogicalView/Core/LVScope.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/DebugInfo/LogicalView/Core/LVScope.cpp b/llvm/lib/DebugInfo/LogicalView/Core/LVScope.cpp
index 55880fab5e88e..93a567e89f774 100644
--- a/llvm/lib/DebugInfo/LogicalView/Core/LVScope.cpp
+++ b/llvm/lib/DebugInfo/LogicalView/Core/LVScope.cpp
@@ -2097,7 +2097,7 @@ Error LVScopeRoot::doPrintMatches(bool Split, raw_ostream &OS,
     print(OS);
 
     for (LVScope *Scope : *Scopes) {
-      getReader().setCompileUnit(const_cast<LVScope *>(Scope));
+      getReader().setCompileUnit(Scope);
 
       // If 'Split', we use the scope name (CU name) as the ouput file; the
       // delimiters in the pathname, must be replaced by a normal character.


        


More information about the llvm-commits mailing list