[MC] Pass MCSymbolData to needsRelocateWithSymbol
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Sun, 20 Jul 2014 23:15:06 +0000 (23:15 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Sun, 20 Jul 2014 23:15:06 +0000 (23:15 +0000)
commit46797c69609b4f2324057a2c7a56ff78e6902006
treea858cb744a52275332f915d548b73be8a3a272e6
parent7ae00a1282756eafba089f1515c7b439d812c6a0
[MC] Pass MCSymbolData to needsRelocateWithSymbol

As discussed in a previous checking to support the .localentry
directive on PowerPC, we need to inspect the actual target symbol
in needsRelocateWithSymbol to make the appropriate decision based
on that symbol's st_other bits.

Currently, needsRelocateWithSymbol does not get the target symbol.
However, it is directly available to its sole caller.  This patch
therefore simply extends the needsRelocateWithSymbol by a new
parameter "const MCSymbolData &SD", passes in the target symbol,
and updates all derived implementations.

In particular, in the PowerPC implementation, this patch removes
the FIXME added by the previous checkin.

llvm-svn: 213487
llvm/include/llvm/MC/MCELFObjectWriter.h
llvm/lib/MC/ELFObjectWriter.cpp
llvm/lib/MC/MCELFObjectTargetWriter.cpp
llvm/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp
llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
llvm/test/MC/PowerPC/ppc64-localentry.s