summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCSubtarget.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-02 19:35:16 +0000
committerChris Lattner <sabre@nondot.org>2008-01-02 19:35:16 +0000
commit564da5d646dfeb56df931b42fefa7c5f2591057e (patch)
tree4816f2188af19c5e746a43e9a5dc5c5aabf1e777 /lib/Target/PowerPC/PPCSubtarget.h
parent9258cd3994e54aaec66f69a321032e071391dc90 (diff)
downloadllvm-564da5d646dfeb56df931b42fefa7c5f2591057e.tar.gz
llvm-564da5d646dfeb56df931b42fefa7c5f2591057e.tar.bz2
llvm-564da5d646dfeb56df931b42fefa7c5f2591057e.tar.xz
leopard and above support alignment for common symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45493 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCSubtarget.h')
-rw-r--r--lib/Target/PowerPC/PPCSubtarget.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/Target/PowerPC/PPCSubtarget.h b/lib/Target/PowerPC/PPCSubtarget.h
index c8c1790088..c55e09720b 100644
--- a/lib/Target/PowerPC/PPCSubtarget.h
+++ b/lib/Target/PowerPC/PPCSubtarget.h
@@ -71,8 +71,11 @@ protected:
bool HasAltivec;
bool HasFSQRT;
bool HasSTFIWX;
- bool IsDarwin;
bool HasLazyResolverStubs;
+
+ /// DarwinVers - Nonzero if this is a darwin platform. Otherwise, the numeric
+ /// version of the platform, e.g. 8 = 10.4 (Tiger), 9 = 10.5 (Leopard), etc.
+ unsigned char DarwinVers; // Is any darwin-ppc platform.
public:
/// This constructor initializes the data members to match that
/// of the specified module.
@@ -132,10 +135,13 @@ public:
bool hasAltivec() const { return HasAltivec; }
bool isGigaProcessor() const { return IsGigaProcessor; }
- bool isDarwin() const { return IsDarwin; }
+ /// isDarwin - True if this is any darwin platform.
+ bool isDarwin() const { return DarwinVers != 0; }
+ /// isDarwin - True if this is darwin9 (leopard, 10.5) or above.
+ bool isDarwin9() const { return DarwinVers >= 9; }
- bool isMachoABI() const { return IsDarwin || IsPPC64; }
- bool isELF32_ABI() const { return !IsDarwin && !IsPPC64; }
+ bool isMachoABI() const { return isDarwin() || IsPPC64; }
+ bool isELF32_ABI() const { return !isDarwin() && !IsPPC64; }
unsigned getAsmFlavor() const {
return AsmFlavor != Unset ? unsigned(AsmFlavor) : 0;