diff options
author | Kevin Enderby <enderby@apple.com> | 2010-09-30 16:38:07 +0000 |
---|---|---|
committer | Kevin Enderby <enderby@apple.com> | 2010-09-30 16:38:07 +0000 |
commit | bad267fa05854d89e1e7b86e9333b6ee17b11266 (patch) | |
tree | e6ae4a25c1304617b797568d4444233fddf98b57 /llvm/lib/Target/X86/X86AsmBackend.cpp | |
parent | f25bc19e171fb501ac9a11cf99527e0e3f6a43b7 (diff) | |
download | bcm5719-llvm-bad267fa05854d89e1e7b86e9333b6ee17b11266.tar.gz bcm5719-llvm-bad267fa05854d89e1e7b86e9333b6ee17b11266.zip |
Adds getPointerSize() to the AsmBackend which will be needed by the final patch
for the dwarf .loc support to emit dwarf line number tables.
llvm-svn: 115153
Diffstat (limited to 'llvm/lib/Target/X86/X86AsmBackend.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86AsmBackend.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86AsmBackend.cpp b/llvm/lib/Target/X86/X86AsmBackend.cpp index d9c6daa2cc2..cabc6015aa6 100644 --- a/llvm/lib/Target/X86/X86AsmBackend.cpp +++ b/llvm/lib/Target/X86/X86AsmBackend.cpp @@ -211,6 +211,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 new ELFObjectWriter(OS, /*Is64Bit=*/false, OSType, @@ -224,6 +228,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 new ELFObjectWriter(OS, /*Is64Bit=*/true, OSType, @@ -241,6 +249,13 @@ public: HasScatteredSymbols = true; } + unsigned getPointerSize() const { + if (Is64Bit) + return 8; + else + return 4; + } + MCObjectWriter *createObjectWriter(raw_ostream &OS) const { return createWinCOFFObjectWriter(OS, Is64Bit); } @@ -272,6 +287,10 @@ public: DarwinX86_32AsmBackend(const Target &T) : DarwinX86AsmBackend(T) {} + unsigned getPointerSize() const { + return 4; + } + MCObjectWriter *createObjectWriter(raw_ostream &OS) const { return new MachObjectWriter(OS, /*Is64Bit=*/false); } @@ -284,6 +303,10 @@ public: HasReliableSymbolDifference = true; } + unsigned getPointerSize() const { + return 8; + } + MCObjectWriter *createObjectWriter(raw_ostream &OS) const { return new MachObjectWriter(OS, /*Is64Bit=*/true); } |