Refactor RelocVisitor to take an object. This removes some

string comparisons and makes it a bit easier to check individual
targets.

Patch by Charlie Turner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219108 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2014-10-06 06:55:55 +00:00
parent b23e9d77e8
commit 7d0a297dbd
3 changed files with 116 additions and 98 deletions

View File

@ -626,7 +626,7 @@ DWARFContextInMemory::DWARFContextInMemory(object::ObjectFile &Obj)
Sym->getAddress(SymAddr);
}
object::RelocVisitor V(Obj.getFileFormatName());
object::RelocVisitor V(Obj);
// The section address is always 0 for debug sections.
object::RelocToApply R(V.visit(Type, Reloc, 0, SymAddr));
if (V.error()) {