[LLDB] Remove cases of using namespace llvm:: from header file
We have using namespace llvm::dwarf in dwarf.h header globally. Replacing that with a using namespace within lldb_private::dwarf and moving to a using namespace lldb_private::dwarf in .cpp files and fully qualified names in the few header files. Differential Revision: https://reviews.llvm.org/D120836
This commit is contained in:
parent
61f2b3ed21
commit
ae869d4484
@ -15,8 +15,11 @@
|
||||
// Get the DWARF constant definitions from llvm
|
||||
#include "llvm/BinaryFormat/Dwarf.h"
|
||||
|
||||
// and stuff them in our default namespace
|
||||
using namespace llvm::dwarf;
|
||||
namespace lldb_private {
|
||||
namespace dwarf {
|
||||
using namespace llvm::dwarf;
|
||||
}
|
||||
}
|
||||
|
||||
typedef uint32_t dw_uleb128_t;
|
||||
typedef int32_t dw_sleb128_t;
|
||||
|
@ -106,7 +106,8 @@ private:
|
||||
CIE(dw_offset_t offset)
|
||||
: cie_offset(offset), version(-1), code_align(0), data_align(0),
|
||||
return_addr_reg_num(LLDB_INVALID_REGNUM), inst_offset(0),
|
||||
inst_length(0), ptr_encoding(0), lsda_addr_encoding(DW_EH_PE_omit),
|
||||
inst_length(0), ptr_encoding(0),
|
||||
lsda_addr_encoding(llvm::dwarf::DW_EH_PE_omit),
|
||||
personality_loc(LLDB_INVALID_ADDRESS) {}
|
||||
};
|
||||
|
||||
|
@ -43,6 +43,7 @@
|
||||
|
||||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
using namespace lldb_private::dwarf;
|
||||
|
||||
static lldb::addr_t
|
||||
ReadAddressFromDebugAddrSection(const DWARFUnit *dwarf_cu,
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
using namespace lldb_private;
|
||||
using namespace lldb;
|
||||
using namespace lldb_private::dwarf;
|
||||
|
||||
std::unique_ptr<AppleDWARFIndex> AppleDWARFIndex::Create(
|
||||
Module &module, DWARFDataExtractor apple_names,
|
||||
|
@ -57,6 +57,7 @@
|
||||
|
||||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
using namespace lldb_private::dwarf;
|
||||
DWARFASTParserClang::DWARFASTParserClang(TypeSystemClang &ast)
|
||||
: m_ast(ast), m_die_to_decl_ctx(), m_decl_ctx_to_die() {}
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "DWARFFormValue.h"
|
||||
|
||||
using namespace lldb_private;
|
||||
using namespace lldb_private::dwarf;
|
||||
|
||||
DWARFAbbreviationDeclaration::DWARFAbbreviationDeclaration() : m_attributes() {}
|
||||
|
||||
|
@ -10,6 +10,8 @@
|
||||
#include "DWARFUnit.h"
|
||||
#include "DWARFDebugInfo.h"
|
||||
|
||||
using namespace lldb_private::dwarf;
|
||||
|
||||
DWARFAttributes::DWARFAttributes() : m_infos() {}
|
||||
|
||||
DWARFAttributes::~DWARFAttributes() = default;
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "DWARFUnit.h"
|
||||
|
||||
using namespace lldb_private;
|
||||
using namespace lldb_private::dwarf;
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "SymbolFileDWARFDwo.h"
|
||||
|
||||
using namespace lldb_private;
|
||||
using namespace lldb_private::dwarf;
|
||||
using namespace std;
|
||||
extern int g_verbose;
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "DWARFDataExtractor.h"
|
||||
|
||||
using namespace lldb_private;
|
||||
using namespace lldb_private::dwarf;
|
||||
|
||||
DWARFDebugMacroHeader
|
||||
DWARFDebugMacroHeader::ParseHeader(const DWARFDataExtractor &debug_macro_data,
|
||||
|
@ -8,6 +8,8 @@
|
||||
|
||||
#include "DWARFDeclContext.h"
|
||||
|
||||
using namespace lldb_private::dwarf;
|
||||
|
||||
const char *DWARFDeclContext::GetQualifiedName() const {
|
||||
if (m_qualified_name.empty()) {
|
||||
// The declaration context array for a class named "foo" in namespace
|
||||
|
@ -20,6 +20,7 @@
|
||||
class DWARFUnit;
|
||||
|
||||
using namespace lldb_private;
|
||||
using namespace lldb_private::dwarf;
|
||||
|
||||
void DWARFFormValue::Clear() {
|
||||
m_unit = nullptr;
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
using namespace lldb_private::dwarf;
|
||||
using namespace std;
|
||||
|
||||
extern int g_verbose;
|
||||
|
@ -69,7 +69,8 @@ public:
|
||||
dw_offset_t GetTypeOffset() const { return m_type_offset; }
|
||||
uint64_t GetDWOId() const { return m_dwo_id; }
|
||||
bool IsTypeUnit() const {
|
||||
return m_unit_type == DW_UT_type || m_unit_type == DW_UT_split_type;
|
||||
return m_unit_type == llvm::dwarf::DW_UT_type ||
|
||||
m_unit_type == llvm::dwarf::DW_UT_split_type;
|
||||
}
|
||||
uint32_t GetNextUnitOffset() const { return m_offset + m_length + 4; }
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
using namespace lldb_private;
|
||||
using namespace lldb;
|
||||
using namespace lldb_private::dwarf;
|
||||
|
||||
llvm::Expected<std::unique_ptr<DebugNamesDWARFIndex>>
|
||||
DebugNamesDWARFIndex::Create(Module &module, DWARFDataExtractor debug_names,
|
||||
|
@ -9,6 +9,8 @@
|
||||
#include "HashedNameToDIE.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
|
||||
using namespace lldb_private::dwarf;
|
||||
|
||||
bool DWARFMappedHash::ExtractDIEArray(
|
||||
const DIEInfoArray &die_info_array,
|
||||
llvm::function_ref<bool(DIERef ref)> callback) {
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
using namespace lldb_private;
|
||||
using namespace lldb;
|
||||
using namespace lldb_private::dwarf;
|
||||
|
||||
void ManualDWARFIndex::Index() {
|
||||
if (m_indexed)
|
||||
|
@ -96,6 +96,7 @@
|
||||
|
||||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
using namespace lldb_private::dwarf;
|
||||
|
||||
LLDB_PLUGIN_DEFINE(SymbolFileDWARF)
|
||||
|
||||
|
@ -10,6 +10,8 @@
|
||||
|
||||
#include "lldb/Core/Declaration.h"
|
||||
|
||||
using namespace lldb_private::dwarf;
|
||||
|
||||
bool UniqueDWARFASTTypeList::Find(const DWARFDIE &die,
|
||||
const lldb_private::Declaration &decl,
|
||||
const int32_t byte_size,
|
||||
|
@ -25,6 +25,7 @@
|
||||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
using namespace lldb_private::npdb;
|
||||
using namespace lldb_private::dwarf;
|
||||
using namespace llvm::pdb;
|
||||
|
||||
static std::unique_ptr<IPDBFrameData>
|
||||
|
@ -80,6 +80,7 @@
|
||||
|
||||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
using namespace lldb_private::dwarf;
|
||||
using namespace clang;
|
||||
using llvm::StringSwitch;
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
using namespace lldb_private::dwarf;
|
||||
|
||||
// GetDwarfEHPtr
|
||||
//
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
using namespace lldb_private;
|
||||
using namespace lldb_private::postfix;
|
||||
using namespace lldb_private::dwarf;
|
||||
|
||||
static llvm::Optional<BinaryOpNode::OpType>
|
||||
GetBinaryOpType(llvm::StringRef token) {
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
using namespace lldb_private;
|
||||
using namespace lldb_private::dwarf;
|
||||
|
||||
static llvm::Expected<Scalar> Evaluate(llvm::ArrayRef<uint8_t> expr,
|
||||
lldb::ModuleSP module_sp = {},
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
using namespace lldb_private::dwarf;
|
||||
|
||||
namespace {
|
||||
class DWARFASTParserClangTests : public testing::Test {};
|
||||
|
@ -39,6 +39,7 @@
|
||||
|
||||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
using namespace lldb_private::dwarf;
|
||||
|
||||
class SymbolFileDWARFTests : public testing::Test {
|
||||
SubsystemRAII<FileSystem, HostInfo, ObjectFilePECOFF, SymbolFileDWARF,
|
||||
|
Loading…
x
Reference in New Issue
Block a user