This revision was automatically updated to reflect the committed changes.
Closed by commit rG3da4f9c57b15: [lldb][NFC] Move non-clang specific method to
the generic DWARF Parser (authored by ljmf00).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114719/new/
https://reviews.llvm.org/D114719
Files:
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -8,6 +8,7 @@
#include <cstdlib>
+#include "DWARFASTParser.h"
#include "DWARFASTParserClang.h"
#include "DWARFDebugInfo.h"
#include "DWARFDeclContext.h"
@@ -63,20 +64,6 @@
DWARFASTParserClang::~DWARFASTParserClang() = default;
-static AccessType DW_ACCESS_to_AccessType(uint32_t dwarf_accessibility) {
- switch (dwarf_accessibility) {
- case DW_ACCESS_public:
- return eAccessPublic;
- case DW_ACCESS_private:
- return eAccessPrivate;
- case DW_ACCESS_protected:
- return eAccessProtected;
- default:
- break;
- }
- return eAccessNone;
-}
-
static bool DeclKindIsCXXClass(clang::Decl::Kind decl_kind) {
switch (decl_kind) {
case clang::Decl::CXXRecord:
@@ -314,7 +301,7 @@
break;
case DW_AT_accessibility:
- accessibility = DW_ACCESS_to_AccessType(form_value.Unsigned());
+ accessibility = DWARFASTParser::GetAccessTypeFromDWARF(form_value.Unsigned());
break;
case DW_AT_artificial:
@@ -1423,7 +1410,7 @@
break;
case DW_AT_accessibility:
- accessibility = DW_ACCESS_to_AccessType(form_value.Unsigned());
+ accessibility = DWARFASTParser::GetAccessTypeFromDWARF(form_value.Unsigned());
break;
case DW_AT_virtuality:
@@ -2478,7 +2465,7 @@
break;
case DW_AT_accessibility:
- accessibility = DW_ACCESS_to_AccessType(form_value.Unsigned());
+ accessibility = DWARFASTParser::GetAccessTypeFromDWARF(form_value.Unsigned());
break;
case DW_AT_artificial:
is_artificial = form_value.Boolean();
Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.h
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.h
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.h
@@ -14,6 +14,7 @@
#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Symbol/CompilerDecl.h"
#include "lldb/Symbol/CompilerDeclContext.h"
+#include "lldb/lldb-enumerations.h"
class DWARFDIE;
namespace lldb_private {
@@ -54,6 +55,8 @@
static llvm::Optional<lldb_private::SymbolFile::ArrayInfo>
ParseChildArrayInfo(const DWARFDIE &parent_die,
const lldb_private::ExecutionContext *exe_ctx = nullptr);
+
+ static lldb::AccessType GetAccessTypeFromDWARF(uint32_t dwarf_accessibility);
};
#endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFASTPARSER_H
Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.cpp
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.cpp
@@ -98,3 +98,18 @@
}
return array_info;
}
+
+AccessType
+DWARFASTParser::GetAccessTypeFromDWARF(uint32_t dwarf_accessibility) {
+ switch (dwarf_accessibility) {
+ case DW_ACCESS_public:
+ return eAccessPublic;
+ case DW_ACCESS_private:
+ return eAccessPrivate;
+ case DW_ACCESS_protected:
+ return eAccessProtected;
+ default:
+ break;
+ }
+ return eAccessNone;
+}
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits