[Lldb-commits] [lldb] r372974 - [lldb][modern-type-lookup] Fix crash when activating modern-type-lookup on Linux

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 26 05:33:49 PDT 2019


Author: teemperor
Date: Thu Sep 26 05:33:48 2019
New Revision: 372974

URL: http://llvm.org/viewvc/llvm-project?rev=372974&view=rev
Log:
[lldb][modern-type-lookup] Fix crash when activating modern-type-lookup on Linux

There is no ClangModulesDeclVendor on Linux so that cast is triggering an assert.
Let's just remove it as it just casts the type to itself.

Modified:
    lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp?rev=372974&r1=372973&r2=372974&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp Thu Sep 26 05:33:48 2019
@@ -108,8 +108,7 @@ void ClangASTSource::InstallASTContext(c
     } while (false);
 
     do {
-      auto *modules_decl_vendor = llvm::cast<ClangModulesDeclVendor>(
-          m_target->GetClangModulesDeclVendor());
+      auto *modules_decl_vendor = m_target->GetClangModulesDeclVendor();
 
       if (!modules_decl_vendor)
         break;




More information about the lldb-commits mailing list