[llvm-commits] [llvm] r107137 - /llvm/trunk/lib/MC/MachObjectWriter.cpp
Duncan Sands
baldrick at free.fr
Tue Jun 29 06:26:33 PDT 2010
Author: baldrick
Date: Tue Jun 29 08:26:33 2010
New Revision: 107137
URL: http://llvm.org/viewvc/llvm-project?rev=107137&view=rev
Log:
The variable "Value" is carefully set to Layout.getSymbolAddress,
but then not actually used - maybe a bug? Remove the variable.
Modified:
llvm/trunk/lib/MC/MachObjectWriter.cpp
Modified: llvm/trunk/lib/MC/MachObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MachObjectWriter.cpp?rev=107137&r1=107136&r2=107137&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MachObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/MachObjectWriter.cpp Tue Jun 29 08:26:33 2010
@@ -823,7 +823,6 @@
// See <reloc.h>.
uint32_t FixupOffset = Layout.getFragmentOffset(Fragment)+Fixup.getOffset();
- uint32_t Value = 0;
unsigned Index = 0;
unsigned IsExtern = 0;
unsigned Type = 0;
@@ -834,7 +833,6 @@
// FIXME: Currently, these are never generated (see code below). I cannot
// find a case where they are actually emitted.
Type = RIT_Vanilla;
- Value = 0;
} else {
// Check whether we need an external or internal relocation.
if (doesSymbolRequireExternRelocation(SD)) {
@@ -845,11 +843,9 @@
// undefined. This occurs with weak definitions, for example.
if (!SD->Symbol->isUndefined())
FixedValue -= Layout.getSymbolAddress(SD);
- Value = 0;
} else {
// The index is the section ordinal (1-based).
Index = SD->getFragment()->getParent()->getOrdinal() + 1;
- Value = Layout.getSymbolAddress(SD);
}
Type = RIT_Vanilla;
More information about the llvm-commits
mailing list