[llvm] r173983 - Encapsulate testing that we have an iOS Triple in Triple.h in the method isiOS

Chandler Carruth chandlerc at google.com
Wed Jan 30 15:17:25 PST 2013


On Wed, Jan 30, 2013 at 2:38 PM, Michael Gottesman <mgottesman at apple.com>wrote:

> Author: mgottesman
> Date: Wed Jan 30 16:38:19 2013
> New Revision: 173983
>
> URL: http://llvm.org/viewvc/llvm-project?rev=173983&view=rev
> Log:
> Encapsulate testing that we have an iOS Triple in Triple.h in the method
> isiOS
> so we follow the convention that all other platforms follow by having an
> is*
> test method.
>

Add a unit test for this as well?

(Just for pedantry's sake, clearly there is no confusing logic here. =])


>
> Modified:
>     llvm/trunk/include/llvm/ADT/Triple.h
>
> Modified: llvm/trunk/include/llvm/ADT/Triple.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Triple.h?rev=173983&r1=173982&r2=173983&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/ADT/Triple.h (original)
> +++ llvm/trunk/include/llvm/ADT/Triple.h Wed Jan 30 16:38:19 2013
> @@ -296,9 +296,14 @@ public:
>      return getOS() == Triple::Darwin || getOS() == Triple::MacOSX;
>    }
>
> +  /// Is this an iOS triple.
> +  bool isiOS() const {
> +    return getOS() == Triple::IOS;
> +  }
> +
>    /// isOSDarwin - Is this a "Darwin" OS (OS X or iOS).
>    bool isOSDarwin() const {
> -    return isMacOSX() || getOS() == Triple::IOS;
> +    return isMacOSX() || isiOS();
>    }
>
>    /// \brief Tests for either Cygwin or MinGW OS
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130130/346c13ae/attachment.html>


More information about the llvm-commits mailing list