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);
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);
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits