[llvm] r211701 - Simplify AddValueSymbols. No functionality change.
Rafael Espindola
rafael.espindola at gmail.com
Wed Jun 25 07:42:14 PDT 2014
Author: rafael
Date: Wed Jun 25 09:42:14 2014
New Revision: 211701
URL: http://llvm.org/viewvc/llvm-project?rev=211701&view=rev
Log:
Simplify AddValueSymbols. No functionality change.
Modified:
llvm/trunk/include/llvm/MC/MCObjectStreamer.h
llvm/trunk/lib/MC/MCObjectStreamer.cpp
Modified: llvm/trunk/include/llvm/MC/MCObjectStreamer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCObjectStreamer.h?rev=211701&r1=211700&r2=211701&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCObjectStreamer.h (original)
+++ llvm/trunk/include/llvm/MC/MCObjectStreamer.h Wed Jun 25 09:42:14 2014
@@ -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; }
Modified: llvm/trunk/lib/MC/MCObjectStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCObjectStreamer.cpp?rev=211701&r1=211700&r2=211701&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCObjectStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCObjectStreamer.cpp Wed Jun 25 09:42:14 2014
@@ -83,7 +83,7 @@ MCDataFragment *MCObjectStreamer::getOrC
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::AddValue
AddValueSymbols(cast<MCUnaryExpr>(Value)->getSubExpr());
break;
}
-
- return Value;
}
void MCObjectStreamer::EmitCFISections(bool EH, bool Debug) {
@@ -125,7 +123,8 @@ void MCObjectStreamer::EmitValueImpl(con
// Avoid fixups when possible.
int64_t AbsValue;
- if (AddValueSymbols(Value)->EvaluateAsAbsolute(AbsValue, getAssembler())) {
+ AddValueSymbols(Value);
+ if (Value->EvaluateAsAbsolute(AbsValue, getAssembler())) {
EmitIntValue(AbsValue, Size);
return;
}
More information about the llvm-commits
mailing list