[Lldb-commits] [lldb] r368615 - Revert "[lldb] Fix dynamic_cast by no longer failing on variable without metadata"

Stella Stamenova via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 12 13:08:05 PDT 2019


Author: stella.stamenova
Date: Mon Aug 12 13:08:05 2019
New Revision: 368615

URL: http://llvm.org/viewvc/llvm-project?rev=368615&view=rev
Log:
Revert "[lldb] Fix dynamic_cast by no longer failing on variable without metadata"

This reverts commit b448d1bf212219febbb182d00c210bad1bd25e7f.

Removed:
    lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/dynamic_cast/
Modified:
    lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp?rev=368615&r1=368614&r2=368615&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp Mon Aug 12 13:08:05 2019
@@ -1265,10 +1265,16 @@ bool IRForTarget::MaybeHandleVariable(Va
     clang::NamedDecl *named_decl = DeclForGlobal(global_variable);
 
     if (!named_decl) {
+      if (IsObjCSelectorRef(llvm_value_ptr))
+        return true;
+
+      if (!global_variable->hasExternalLinkage())
+        return true;
+
       LLDB_LOG(log, "Found global variable \"{0}\" without metadata",
                global_variable->getName());
 
-      return true;
+      return false;
     }
 
     llvm::StringRef name(named_decl->getName());




More information about the lldb-commits mailing list