[lld] r173922 - [ELF][x86-64] Add TargetLayout.
Michael J. Spencer
bigcheesegs at gmail.com
Wed Jan 30 02:43:26 PST 2013
Author: mspencer
Date: Wed Jan 30 04:43:25 2013
New Revision: 173922
URL: http://llvm.org/viewvc/llvm-project?rev=173922&view=rev
Log:
[ELF][x86-64] Add TargetLayout.
Modified:
lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.cpp
lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.h
Modified: lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.cpp?rev=173922&r1=173921&r2=173922&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.cpp Wed Jan 30 04:43:25 2013
@@ -87,5 +87,6 @@ ErrorOr<void> X86_64TargetRelocationHand
}
X86_64TargetHandler::X86_64TargetHandler(X86_64TargetInfo &targetInfo)
- : DefaultTargetHandler(targetInfo), _relocationHandler(targetInfo) {
+ : DefaultTargetHandler(targetInfo), _relocationHandler(targetInfo),
+ _targetLayout(targetInfo) {
}
Modified: lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.h?rev=173922&r1=173921&r2=173922&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.h Wed Jan 30 04:43:25 2013
@@ -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
More information about the llvm-commits
mailing list