Skip to content

Commit e7dc05e

Browse files
committed
MCValue: Make print private
This is a debug-only feature (the relocation specifier is target-specific and cannot be printed without backend support) and not supposed to be used externally. PowerPC imappropriated used it (removed by 7cb66ff).
1 parent 7cb66ff commit e7dc05e

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

llvm/include/llvm/MC/MCValue.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ class MCValue {
3232
int64_t Cst = 0;
3333
uint32_t Specifier = 0;
3434

35+
void print(raw_ostream &OS) const;
36+
37+
/// Print the value to stderr.
38+
void dump() const;
39+
3540
public:
3641
friend class MCAssembler;
3742
friend class MCExpr;
@@ -47,12 +52,6 @@ class MCValue {
4752
/// Is this an absolute (as opposed to relocatable) value.
4853
bool isAbsolute() const { return !SymA && !SymB; }
4954

50-
/// Print the value to the stream \p OS.
51-
void print(raw_ostream &OS) const;
52-
53-
/// Print the value to stderr.
54-
void dump() const;
55-
5655
static MCValue get(const MCSymbol *SymA, const MCSymbol *SymB = nullptr,
5756
int64_t Val = 0, uint32_t Specifier = 0) {
5857
MCValue R;

llvm/lib/MC/MCValue.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ void MCValue::print(raw_ostream &OS) const {
2424

2525
// FIXME: prints as a number, which isn't ideal. But the meaning will be
2626
// target-specific anyway.
27-
if (getRefKind())
28-
OS << ':' << getRefKind() << ':';
27+
if (getSpecifier())
28+
OS << ':' << getSpecifier() << ':';
2929

3030
SymA->print(OS, nullptr);
3131

0 commit comments

Comments
 (0)