diff options
author | Stella Stamenova <stilis@microsoft.com> | 2019-08-12 20:08:05 +0000 |
---|---|---|
committer | Stella Stamenova <stilis@microsoft.com> | 2019-08-12 20:08:05 +0000 |
commit | e7daf78e05d2d72d4f49069ab3c39f4598d437dd (patch) | |
tree | d68e799d28dcf507207207cc8a02ce1ec73029b3 /lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp | |
parent | 36f13e49127e56d6db4aeb76c0bbfacab1988157 (diff) | |
download | bcm5719-llvm-e7daf78e05d2d72d4f49069ab3c39f4598d437dd.tar.gz bcm5719-llvm-e7daf78e05d2d72d4f49069ab3c39f4598d437dd.zip |
Revert "[lldb] Fix dynamic_cast by no longer failing on variable without metadata"
This reverts commit b448d1bf212219febbb182d00c210bad1bd25e7f.
llvm-svn: 368615
Diffstat (limited to 'lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp')
-rw-r--r-- | lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp index b7d84877a35..faac0c19eda 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp @@ -1265,10 +1265,16 @@ bool IRForTarget::MaybeHandleVariable(Value *llvm_value_ptr) { 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()); |