Now that RelocBehaviour() is never overloaded, it doesn't need to be
virtual.  Just inline it into its two current call sites in preparation
for simplifying the code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76686 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/ELFTargetAsmInfo.cpp b/lib/Target/ELFTargetAsmInfo.cpp
index bd2dd0a..8ace00a 100644
--- a/lib/Target/ELFTargetAsmInfo.cpp
+++ b/lib/Target/ELFTargetAsmInfo.cpp
@@ -57,7 +57,13 @@
   if (GVar->hasInitializer()) {
     Constant *C = GVar->getInitializer();
     bool isConstant = GVar->isConstant();
-    unsigned Reloc = RelocBehaviour();
+    
+    
+    // By default - all relocations in PIC mode would force symbol to be
+    // placed in r/w section.
+    unsigned Reloc = (TM.getRelocationModel() != Reloc::Static ?
+                      Reloc::LocalOrGlobal : Reloc::None);
+    
     if (Reloc != Reloc::None && C->ContainsRelocations(Reloc))
       return (C->ContainsRelocations(Reloc::Global) ?
               (isConstant ?