llvm.org GIT mirror llvm / 8974153
ADT/Triple: Add isOSVersionLT helper function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129800 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 9 years ago
1 changed file(s) with 14 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
248248 return getOSMajorVersion();
249249 }
250250
251 bool isOSVersionLT(unsigned Major, unsigned B_Minor, unsigned Micro) {
252 unsigned LHS[3];
253 getOSVersion(LHS[0], LHS[1], LHS[2]);
254
255 if (LHS[0] != Major)
256 return LHS[0] < Major;
257 if (LHS[1] != Minor)
258 return LHS[1] < Minor;
259 if (LHS[2] != Micro)
260 return LHS[1] < Micro;
261
262 return false;
263 }
264
251265 /// @}
252266 /// @name Mutators
253267 /// @{