llvm.org GIT mirror llvm / 18a0929
Target/PPC: Kill off DarwinVers, which is now dead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129811 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 9 years ago
2 changed file(s) with 1 addition(s) and 24 deletion(s). Raw diff Collapse all Expand all
6969 , HasSTFIWX(false)
7070 , HasLazyResolverStubs(false)
7171 , IsJITCodeModel(false)
72 , DarwinVers(0)
7372 , TargetTriple(TT) {
7473
7574 // Determine default and user specified characteristics
9291 // support it, ignore.
9392 if (use64BitRegs() && !has64BitSupport())
9493 Use64BitRegs = false;
95
96 // Set the boolean corresponding to the current target triple, or the default
97 // if one cannot be determined, to true.
98 if (TT.length() > 7) {
99 // Determine which version of darwin this is.
100 size_t DarwinPos = TT.find("-darwin");
101 if (DarwinPos != std::string::npos) {
102 if (isdigit(TT[DarwinPos+7]))
103 DarwinVers = atoi(&TT[DarwinPos+7]);
104 else
105 DarwinVers = 8; // Minimum supported darwin is Tiger.
106 }
107 }
10894
10995 // Set up darwin-specific properties.
11096 if (isDarwin())
6565 bool HasLazyResolverStubs;
6666 bool IsJITCodeModel;
6767
68 /// DarwinVers - Nonzero if this is a darwin platform. Otherwise, the numeric
69 /// version of the platform, e.g. 8 = 10.4 (Tiger), 9 = 10.5 (Leopard), etc.
70 unsigned char DarwinVers; // Is any darwin-ppc platform.
71
7268 /// TargetTriple - What processor and OS we're targeting.
7369 Triple TargetTriple;
7470
141137 const Triple &getTargetTriple() const { return TargetTriple; }
142138
143139 /// isDarwin - True if this is any darwin platform.
144 bool isDarwin() const { return DarwinVers != 0; }
145 /// isDarwin - True if this is darwin9 (leopard, 10.5) or above.
146 bool isDarwin9() const { return DarwinVers >= 9; }
147
148 /// getDarwinVers - Return the darwin version number, 8 = tiger, 9 = leopard.
149 unsigned getDarwinVers() const { return DarwinVers; }
140 bool isDarwin() const { return TargetTriple.isOSX(); }
150141
151142 bool isDarwinABI() const { return isDarwin(); }
152143 bool isSVR4ABI() const { return !isDarwin(); }