aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86AsmBackend.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-12-10 04:01:09 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-12-10 04:01:09 +0000
commitf7fd4aa2610f46467369de07f3ec669561d79be0 (patch)
treeba219076796941e4d0e03ce11b8f6da2bdf00ec6 /lib/Target/X86/X86AsmBackend.cpp
parent51c06bf6ad16adf0637e7dc910c9943cdb5d000b (diff)
Revert my previous patch to make the valgrind bots happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121461 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86AsmBackend.cpp')
-rw-r--r--lib/Target/X86/X86AsmBackend.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/Target/X86/X86AsmBackend.cpp b/lib/Target/X86/X86AsmBackend.cpp
index f251585f3b..5626fd7afd 100644
--- a/lib/Target/X86/X86AsmBackend.cpp
+++ b/lib/Target/X86/X86AsmBackend.cpp
@@ -279,6 +279,10 @@ public:
ELFX86_32AsmBackend(const Target &T, Triple::OSType OSType)
: ELFX86AsmBackend(T, OSType) {}
+ unsigned getPointerSize() const {
+ return 4;
+ }
+
MCObjectWriter *createObjectWriter(raw_ostream &OS) const {
return createELFObjectWriter(OS, /*Is64Bit=*/false,
OSType, ELF::EM_386,
@@ -292,6 +296,10 @@ public:
ELFX86_64AsmBackend(const Target &T, Triple::OSType OSType)
: ELFX86AsmBackend(T, OSType) {}
+ unsigned getPointerSize() const {
+ return 8;
+ }
+
MCObjectWriter *createObjectWriter(raw_ostream &OS) const {
return createELFObjectWriter(OS, /*Is64Bit=*/true,
OSType, ELF::EM_X86_64,
@@ -315,6 +323,13 @@ public:
return Format;
}
+ unsigned getPointerSize() const {
+ if (Is64Bit)
+ return 8;
+ else
+ return 4;
+ }
+
MCObjectWriter *createObjectWriter(raw_ostream &OS) const {
return createWinCOFFObjectWriter(OS, Is64Bit);
}
@@ -339,6 +354,10 @@ public:
DarwinX86_32AsmBackend(const Target &T)
: DarwinX86AsmBackend(T) {}
+ unsigned getPointerSize() const {
+ return 4;
+ }
+
MCObjectWriter *createObjectWriter(raw_ostream &OS) const {
return createMachObjectWriter(OS, /*Is64Bit=*/false,
object::mach::CTM_i386,
@@ -354,6 +373,10 @@ public:
HasReliableSymbolDifference = true;
}
+ unsigned getPointerSize() const {
+ return 8;
+ }
+
MCObjectWriter *createObjectWriter(raw_ostream &OS) const {
return createMachObjectWriter(OS, /*Is64Bit=*/true,
object::mach::CTM_x86_64,