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
diff --git a/lib/MC/MCDwarf.cpp b/lib/MC/MCDwarf.cpp
index 0296951..09a87fb 100644
--- a/lib/MC/MCDwarf.cpp
+++ b/lib/MC/MCDwarf.cpp
@@ -468,26 +468,21 @@
   MCContext &context = streamer.getContext();
   const MCAsmInfo &asmInfo = context.getAsmInfo();
   const MCExpr *v = asmInfo.getExprForFDESymbol(&symbol,
+                                                symbolEncoding,
                                                 streamer);
   unsigned size = getSizeForEncoding(streamer, symbolEncoding);
-  unsigned application = symbolEncoding & 0x70;
-  if (isa<MCSymbolRefExpr>(v) && application == dwarf::DW_EH_PE_pcrel)
-    streamer.EmitPCRelValue(v, size);
-  else
-    streamer.EmitAbsValue(v, size);
+  streamer.EmitAbsValue(v, size);
 }
 
 static void EmitPersonality(MCStreamer &streamer, const MCSymbol &symbol,
                             unsigned symbolEncoding) {
   MCContext &context = streamer.getContext();
   const MCAsmInfo &asmInfo = context.getAsmInfo();
-  const MCExpr *v = asmInfo.getExprForPersonalitySymbol(&symbol, streamer);
+  const MCExpr *v = asmInfo.getExprForPersonalitySymbol(&symbol,
+                                                        symbolEncoding,
+                                                        streamer);
   unsigned size = getSizeForEncoding(streamer, symbolEncoding);
-  unsigned application = symbolEncoding & 0x70;
-  if (isa<MCSymbolRefExpr>(v) && application == dwarf::DW_EH_PE_pcrel)
-    streamer.EmitPCRelValue(v, size);
-  else
-    streamer.EmitValue(v, size);
+  streamer.EmitValue(v, size);
 }
 
 static const MachineLocation TranslateMachineLocation(