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
This commit is contained in:
Chris Lattner
2009-07-21 23:47:11 +00:00
parent 248f80d488
commit 97d2cae44b
3 changed files with 10 additions and 17 deletions

View File

@@ -57,7 +57,13 @@ ELFTargetAsmInfo::SectionKindForGlobal(const GlobalValue *GV) const {
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 ?