Skip to content

Commit 85fe4ab

Browse files
Rename GsymDIContext to GsymContext (#140227)
Renaming based on suggestion here: #139686 (comment)
1 parent 4b104c6 commit 85fe4ab

File tree

5 files changed

+26
-26
lines changed

5 files changed

+26
-26
lines changed

llvm/include/llvm/DebugInfo/GSYM/GsymDIContext.h renamed to llvm/include/llvm/DebugInfo/GSYM/GsymContext.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
//===-- GsymDIContext.h --------------------------------------------------===//
1+
//===-- GsymContext.h --------------------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===/
88

9-
#ifndef LLVM_DEBUGINFO_GSYM_GSYMDICONTEXT_H
10-
#define LLVM_DEBUGINFO_GSYM_GSYMDICONTEXT_H
9+
#ifndef LLVM_DEBUGINFO_GSYM_GSYMCONTEXT_H
10+
#define LLVM_DEBUGINFO_GSYM_GSYMCONTEXT_H
1111

1212
#include "llvm/DebugInfo/DIContext.h"
1313
#include <cstdint>
@@ -27,12 +27,12 @@ class GsymReader;
2727
/// interface to different symbolication formats (e.g. GSYM, PDB and DWARF).
2828
/// More control and power over the debug information access can be had by using
2929
/// the GSYM interfaces directly.
30-
class GsymDIContext : public DIContext {
30+
class GsymContext : public DIContext {
3131
public:
32-
GsymDIContext(std::unique_ptr<GsymReader> Reader);
32+
GsymContext(std::unique_ptr<GsymReader> Reader);
3333

34-
GsymDIContext(GsymDIContext &) = delete;
35-
GsymDIContext &operator=(GsymDIContext &) = delete;
34+
GsymContext(GsymContext &) = delete;
35+
GsymContext &operator=(GsymContext &) = delete;
3636

3737
static bool classof(const DIContext *DICtx) {
3838
return DICtx->getKind() == CK_GSYM;
@@ -63,4 +63,4 @@ class GsymDIContext : public DIContext {
6363

6464
} // end namespace llvm
6565

66-
#endif // LLVM_DEBUGINFO_PDB_PDBCONTEXT_H
66+
#endif // LLVM_DEBUGINFO_GSYM_GSYMCONTEXT_H

llvm/lib/DebugInfo/GSYM/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ add_llvm_component_library(LLVMDebugInfoGSYM
44
FileWriter.cpp
55
FunctionInfo.cpp
66
GsymCreator.cpp
7-
GsymDIContext.cpp
7+
GsymContext.cpp
88
GsymReader.cpp
99
InlineInfo.cpp
1010
LineTable.cpp

llvm/lib/DebugInfo/GSYM/GsymDIContext.cpp renamed to llvm/lib/DebugInfo/GSYM/GsymContext.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
//===-- GsymDIContext.cpp ------------------------------------------------===//
1+
//===-- GsymContext.cpp ------------------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===/
88

9-
#include "llvm/DebugInfo/GSYM/GsymDIContext.h"
9+
#include "llvm/DebugInfo/GSYM/GsymContext.h"
1010

1111
#include "llvm/DebugInfo/GSYM/GsymReader.h"
1212
#include "llvm/Support/Path.h"
1313

1414
using namespace llvm;
1515
using namespace llvm::gsym;
1616

17-
GsymDIContext::GsymDIContext(std::unique_ptr<GsymReader> Reader)
17+
GsymContext::GsymContext(std::unique_ptr<GsymReader> Reader)
1818
: DIContext(CK_GSYM), Reader(std::move(Reader)) {}
1919

20-
void GsymDIContext::dump(raw_ostream &OS, DIDumpOptions DumpOpts) {}
20+
void GsymContext::dump(raw_ostream &OS, DIDumpOptions DumpOpts) {}
2121

2222
static bool fillLineInfoFromLocation(const SourceLocation &Location,
2323
DILineInfoSpecifier Specifier,
@@ -61,8 +61,8 @@ static bool fillLineInfoFromLocation(const SourceLocation &Location,
6161
}
6262

6363
std::optional<DILineInfo>
64-
GsymDIContext::getLineInfoForAddress(object::SectionedAddress Address,
65-
DILineInfoSpecifier Specifier) {
64+
GsymContext::getLineInfoForAddress(object::SectionedAddress Address,
65+
DILineInfoSpecifier Specifier) {
6666
if (Address.SectionIndex != object::SectionedAddress::UndefSection)
6767
return {};
6868

@@ -93,16 +93,16 @@ GsymDIContext::getLineInfoForAddress(object::SectionedAddress Address,
9393
}
9494

9595
std::optional<DILineInfo>
96-
GsymDIContext::getLineInfoForDataAddress(object::SectionedAddress Address) {
96+
GsymContext::getLineInfoForDataAddress(object::SectionedAddress Address) {
9797
// We can't implement this, there's no such information in the GSYM file.
9898

9999
return {};
100100
}
101101

102102
DILineInfoTable
103-
GsymDIContext::getLineInfoForAddressRange(object::SectionedAddress Address,
104-
uint64_t Size,
105-
DILineInfoSpecifier Specifier) {
103+
GsymContext::getLineInfoForAddressRange(object::SectionedAddress Address,
104+
uint64_t Size,
105+
DILineInfoSpecifier Specifier) {
106106
if (Size == 0)
107107
return DILineInfoTable();
108108

@@ -131,8 +131,8 @@ GsymDIContext::getLineInfoForAddressRange(object::SectionedAddress Address,
131131
}
132132

133133
DIInliningInfo
134-
GsymDIContext::getInliningInfoForAddress(object::SectionedAddress Address,
135-
DILineInfoSpecifier Specifier) {
134+
GsymContext::getInliningInfoForAddress(object::SectionedAddress Address,
135+
DILineInfoSpecifier Specifier) {
136136
auto ResultOrErr = Reader->lookup(Address.Address);
137137

138138
if (!ResultOrErr)
@@ -159,7 +159,7 @@ GsymDIContext::getInliningInfoForAddress(object::SectionedAddress Address,
159159
}
160160

161161
std::vector<DILocal>
162-
GsymDIContext::getLocalsForAddress(object::SectionedAddress Address) {
162+
GsymContext::getLocalsForAddress(object::SectionedAddress Address) {
163163
// We can't implement this, there's no such information in the GSYM file.
164164

165165
return {};

llvm/lib/DebugInfo/Symbolize/Symbolize.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "llvm/ADT/STLExtras.h"
1616
#include "llvm/DebugInfo/BTF/BTFContext.h"
1717
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
18-
#include "llvm/DebugInfo/GSYM/GsymDIContext.h"
18+
#include "llvm/DebugInfo/GSYM/GsymContext.h"
1919
#include "llvm/DebugInfo/GSYM/GsymReader.h"
2020
#include "llvm/DebugInfo/PDB/PDB.h"
2121
#include "llvm/DebugInfo/PDB/PDBContext.h"
@@ -665,7 +665,7 @@ LLVMSymbolizer::getOrCreateModuleInfo(StringRef ModuleName) {
665665
// If this is a COFF object containing PDB info and not containing DWARF
666666
// section, use a PDBContext to symbolize. Otherwise, use DWARF.
667667
// Create a DIContext to symbolize as follows:
668-
// - If there is a GSYM file, create a GsymDIContext.
668+
// - If there is a GSYM file, create a GsymContext.
669669
// - Otherwise, if this is a COFF object containing PDB info, create a
670670
// PDBContext.
671671
// - Otherwise, create a DWARFContext.
@@ -677,7 +677,7 @@ LLVMSymbolizer::getOrCreateModuleInfo(StringRef ModuleName) {
677677
std::unique_ptr<gsym::GsymReader> Reader =
678678
std::make_unique<gsym::GsymReader>(std::move(*ReaderOrErr));
679679

680-
Context = std::make_unique<gsym::GsymDIContext>(std::move(Reader));
680+
Context = std::make_unique<gsym::GsymContext>(std::move(Reader));
681681
}
682682
}
683683
if (!Context) {

llvm/utils/gn/secondary/llvm/lib/DebugInfo/GSYM/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ static_library("GSYM") {
1212
"FileWriter.cpp",
1313
"FunctionInfo.cpp",
1414
"GsymCreator.cpp",
15-
"GsymDIContext.cpp",
15+
"GsymContext.cpp",
1616
"GsymReader.cpp",
1717
"Header.cpp",
1818
"InlineInfo.cpp",

0 commit comments

Comments
 (0)