[llvm] 815eab2 - [DebugLocEntry][nfc] Remove redundant cast

Felipe de Azevedo Piovezan via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 26 04:56:13 PDT 2023


Author: Felipe de Azevedo Piovezan
Date: 2023-04-26T07:56:15-04:00
New Revision: 815eab2d3cbb290ba1255efef549edae7807cc71

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

LOG: [DebugLocEntry][nfc] Remove redundant cast

A cast from DIExpression->DIExpression is not needed.

Differential Revision: https://reviews.llvm.org/D149178

Added: 
    

Modified: 
    llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h b/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
index 2008aa39ff87f..726aba18bb804 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
@@ -126,7 +126,7 @@ class DbgValueLoc {
       : Expression(Expr), ValueLocEntries(Locs.begin(), Locs.end()),
         IsVariadic(IsVariadic) {
 #ifndef NDEBUG
-    assert(cast<DIExpression>(Expr)->isValid() ||
+    assert(Expr->isValid() ||
            !any_of(Locs, [](auto LE) { return LE.isLocation(); }));
     if (!IsVariadic) {
       assert(ValueLocEntries.size() == 1);


        


More information about the llvm-commits mailing list