diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-05-01 03:50:49 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-05-01 03:50:49 +0000 |
commit | debd7e4e8bc5cfe61bfb71835ce2b1a3fbccc2be (patch) | |
tree | 7069783c01e7b31f77ab0886700221df01554a8a /include | |
parent | d4b0c6c3fa22deee5c447e982058e38022968656 (diff) | |
download | external_llvm-debd7e4e8bc5cfe61bfb71835ce2b1a3fbccc2be.zip external_llvm-debd7e4e8bc5cfe61bfb71835ce2b1a3fbccc2be.tar.gz external_llvm-debd7e4e8bc5cfe61bfb71835ce2b1a3fbccc2be.tar.bz2 |
Simplify the handling of pcrel relocations on ELF. Now we do the right thing
for all symbol differences and can drop the old EmitPCRelSymbolValue
method.
This also make getExprForFDESymbol on ELF equal to the one on MachO, and it
can be made non-virtual.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130634 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/MC/MCAsmInfo.h | 7 | ||||
-rw-r--r-- | include/llvm/MC/MCAsmInfoDarwin.h | 2 | ||||
-rw-r--r-- | include/llvm/MC/MCObjectStreamer.h | 2 | ||||
-rw-r--r-- | include/llvm/MC/MCStreamer.h | 11 |
4 files changed, 7 insertions, 15 deletions
diff --git a/include/llvm/MC/MCAsmInfo.h b/include/llvm/MC/MCAsmInfo.h index 566535e..8733161 100644 --- a/include/llvm/MC/MCAsmInfo.h +++ b/include/llvm/MC/MCAsmInfo.h @@ -326,10 +326,13 @@ namespace llvm { virtual const MCExpr * getExprForPersonalitySymbol(const MCSymbol *Sym, + unsigned Encoding, MCStreamer &Streamer) const; - virtual const MCExpr * - getExprForFDESymbol(const MCSymbol *Sym, MCStreamer &Streamer) const; + const MCExpr * + getExprForFDESymbol(const MCSymbol *Sym, + unsigned Encoding, + MCStreamer &Streamer) const; bool usesSunStyleELFSectionSwitchSyntax() const { return SunStyleELFSectionSwitchSyntax; diff --git a/include/llvm/MC/MCAsmInfoDarwin.h b/include/llvm/MC/MCAsmInfoDarwin.h index 634f163..c85aa3d 100644 --- a/include/llvm/MC/MCAsmInfoDarwin.h +++ b/include/llvm/MC/MCAsmInfoDarwin.h @@ -25,8 +25,6 @@ namespace llvm { struct MCAsmInfoDarwin : public MCAsmInfo { explicit MCAsmInfoDarwin(); - virtual const MCExpr * - getExprForFDESymbol(const MCSymbol *Sym, MCStreamer &Streamer) const; }; } diff --git a/include/llvm/MC/MCObjectStreamer.h b/include/llvm/MC/MCObjectStreamer.h index 69a62d8..8b0d87a 100644 --- a/include/llvm/MC/MCObjectStreamer.h +++ b/include/llvm/MC/MCObjectStreamer.h @@ -63,7 +63,7 @@ public: virtual void EmitLabel(MCSymbol *Symbol); virtual void EmitValueImpl(const MCExpr *Value, unsigned Size, - bool isPCRel, unsigned AddrSpace); + unsigned AddrSpace); virtual void EmitULEB128Value(const MCExpr *Value); virtual void EmitSLEB128Value(const MCExpr *Value); virtual void EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol); diff --git a/include/llvm/MC/MCStreamer.h b/include/llvm/MC/MCStreamer.h index 7f529c6..b005c8b 100644 --- a/include/llvm/MC/MCStreamer.h +++ b/include/llvm/MC/MCStreamer.h @@ -50,9 +50,6 @@ namespace llvm { MCStreamer(const MCStreamer&); // DO NOT IMPLEMENT MCStreamer &operator=(const MCStreamer&); // DO NOT IMPLEMENT - void EmitSymbolValue(const MCSymbol *Sym, unsigned Size, - bool isPCRel, unsigned AddrSpace); - std::vector<MCDwarfFrameInfo> FrameInfos; MCDwarfFrameInfo *getCurrentFrameInfo(); void EnsureValidFrame(); @@ -311,13 +308,10 @@ namespace llvm { /// @param Size - The size of the integer (in bytes) to emit. This must /// match a native machine width. virtual void EmitValueImpl(const MCExpr *Value, unsigned Size, - bool isPCRel, unsigned AddrSpace) = 0; + unsigned AddrSpace) = 0; void EmitValue(const MCExpr *Value, unsigned Size, unsigned AddrSpace = 0); - void EmitPCRelValue(const MCExpr *Value, unsigned Size, - unsigned AddrSpace = 0); - /// EmitIntValue - Special case of EmitValue that avoids the client having /// to pass in a MCExpr for constant integers. virtual void EmitIntValue(uint64_t Value, unsigned Size, @@ -347,9 +341,6 @@ namespace llvm { void EmitSymbolValue(const MCSymbol *Sym, unsigned Size, unsigned AddrSpace = 0); - void EmitPCRelSymbolValue(const MCSymbol *Sym, unsigned Size, - unsigned AddrSpace = 0); - /// EmitGPRel32Value - Emit the expression @p Value into the output as a /// gprel32 (32-bit GP relative) value. /// |