[ELF][x86-64] Add TargetLayout.

llvm-svn: 173922
This commit is contained in:
Michael J. Spencer 2013-01-30 10:43:25 +00:00
parent 8254185eea
commit 23d23953b3
2 changed files with 8 additions and 1 deletions

View File

@ -87,5 +87,6 @@ ErrorOr<void> X86_64TargetRelocationHandler::applyRelocation(
}
X86_64TargetHandler::X86_64TargetHandler(X86_64TargetInfo &targetInfo)
: DefaultTargetHandler(targetInfo), _relocationHandler(targetInfo) {
: DefaultTargetHandler(targetInfo), _relocationHandler(targetInfo),
_targetLayout(targetInfo) {
}

View File

@ -11,6 +11,7 @@
#define LLD_READER_WRITER_ELF_X86_64_TARGET_HANDLER_H
#include "DefaultTargetHandler.h"
#include "TargetLayout.h"
namespace lld {
namespace elf {
@ -35,12 +36,17 @@ class X86_64TargetHandler LLVM_FINAL
public:
X86_64TargetHandler(X86_64TargetInfo &targetInfo);
virtual TargetLayout<X86_64ELFType> &targetLayout() {
return _targetLayout;
}
virtual const X86_64TargetRelocationHandler &getRelocationHandler() const {
return _relocationHandler;
}
private:
X86_64TargetRelocationHandler _relocationHandler;
TargetLayout<X86_64ELFType> _targetLayout;
};
} // end namespace elf
} // end namespace lld