[llvm-commits] [llvm] r129800 - /llvm/trunk/include/llvm/ADT/Triple.h
Duncan Sands
baldrick at free.fr
Mon Apr 25 00:40:38 PDT 2011
Hi Daniel,
> --- llvm/trunk/include/llvm/ADT/Triple.h (original)
> +++ llvm/trunk/include/llvm/ADT/Triple.h Tue Apr 19 15:30:07 2011
> @@ -249,6 +249,20 @@
> return getOSMajorVersion();
> }
>
> + bool isOSVersionLT(unsigned Major, unsigned B_Minor, unsigned Micro) {
Why B_Minor?
> + unsigned LHS[3];
> + getOSVersion(LHS[0], LHS[1], LHS[2]);
> +
> + if (LHS[0] != Major)
> + return LHS[0]< Major;
> + if (LHS[1] != Minor)
> + return LHS[1]< Minor;
> + if (LHS[2] != Micro)
> + return LHS[1]< Micro;
^ Should be LHS[2]. Also, how about using symbolic names rather than LHS[0],
LHS[1] etc?
Ciao, Duncan.
More information about the llvm-commits
mailing list