mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Simplify AddValueSymbols. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211701 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6ce4a9f175
commit
b209f33bc7
@ -78,7 +78,7 @@ protected:
|
||||
/// fragment is not a data fragment.
|
||||
MCDataFragment *getOrCreateDataFragment() const;
|
||||
|
||||
const MCExpr *AddValueSymbols(const MCExpr *Value);
|
||||
void AddValueSymbols(const MCExpr *Value);
|
||||
|
||||
public:
|
||||
MCAssembler &getAssembler() { return *Assembler; }
|
||||
|
@ -83,7 +83,7 @@ MCDataFragment *MCObjectStreamer::getOrCreateDataFragment() const {
|
||||
return F;
|
||||
}
|
||||
|
||||
const MCExpr *MCObjectStreamer::AddValueSymbols(const MCExpr *Value) {
|
||||
void MCObjectStreamer::AddValueSymbols(const MCExpr *Value) {
|
||||
switch (Value->getKind()) {
|
||||
case MCExpr::Target:
|
||||
cast<MCTargetExpr>(Value)->AddValueSymbols(Assembler);
|
||||
@ -107,8 +107,6 @@ const MCExpr *MCObjectStreamer::AddValueSymbols(const MCExpr *Value) {
|
||||
AddValueSymbols(cast<MCUnaryExpr>(Value)->getSubExpr());
|
||||
break;
|
||||
}
|
||||
|
||||
return Value;
|
||||
}
|
||||
|
||||
void MCObjectStreamer::EmitCFISections(bool EH, bool Debug) {
|
||||
@ -125,7 +123,8 @@ void MCObjectStreamer::EmitValueImpl(const MCExpr *Value, unsigned Size,
|
||||
|
||||
// Avoid fixups when possible.
|
||||
int64_t AbsValue;
|
||||
if (AddValueSymbols(Value)->EvaluateAsAbsolute(AbsValue, getAssembler())) {
|
||||
AddValueSymbols(Value);
|
||||
if (Value->EvaluateAsAbsolute(AbsValue, getAssembler())) {
|
||||
EmitIntValue(AbsValue, Size);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user