[Lldb-commits] [PATCH] D92510: [lldb] set created function decl to public access in TypeSystemClang

Zequan Wu via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Dec 2 14:18:33 PST 2020


zequanwu created this revision.
zequanwu added reviewers: teemperor, shafik.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
zequanwu requested review of this revision.
Herald added a subscriber: JDevlieghere.

Test case stack_unwinding01.cpp crashed in Debug build of lldb on Windows due to access specifier not set for function decl.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D92510

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


Index: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
===================================================================
--- lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -2045,6 +2045,8 @@
   func_decl->setConstexprKind(isConstexprSpecified
                                   ? ConstexprSpecKind::Constexpr
                                   : ConstexprSpecKind::Unspecified);
+  if (decl_ctx->isRecord())
+    func_decl->setAccess(clang::AccessSpecifier::AS_public);
   SetOwningModule(func_decl, owning_module);
   if (func_decl)
     decl_ctx->addDecl(func_decl);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92510.309057.patch
Type: text/x-patch
Size: 654 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201202/40ad37b3/attachment.bin>


More information about the lldb-commits mailing list