[Lldb-commits] [lldb] ec1bd25 - [NFC][lldb] Remove unnecessary branch in TypeSystemClang::DumpTypeDescription()

Arthur Eubanks via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 7 10:29:20 PST 2022


Author: Arthur Eubanks
Date: 2022-11-07T10:29:09-08:00
New Revision: ec1bd2546d343aad0d4d8d02c695493f59567553

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

LOG: [NFC][lldb] Remove unnecessary branch in TypeSystemClang::DumpTypeDescription()

Reviewed By: Michael137

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

Added: 
    

Modified: 
    lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index 5175ad81606d..cd142b73ab82 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -9221,14 +9221,8 @@ void TypeSystemClang::DumpTypeDescription(lldb::opaque_compiler_type_t type,
       if (level == eDescriptionLevelVerbose)
         record_decl->dump(llvm_ostrm);
       else {
-        if (auto *cxx_record_decl =
-                llvm::dyn_cast<clang::CXXRecordDecl>(record_decl))
-          cxx_record_decl->print(llvm_ostrm,
-                                 getASTContext().getPrintingPolicy(),
-                                 s->GetIndentLevel());
-        else
-          record_decl->print(llvm_ostrm, getASTContext().getPrintingPolicy(),
-                             s->GetIndentLevel());
+        record_decl->print(llvm_ostrm, getASTContext().getPrintingPolicy(),
+                           s->GetIndentLevel());
       }
     } break;
 


        


More information about the lldb-commits mailing list