[llvm] r276334 - Fix the clang-cl self-host with VS 2013 headers

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 14:51:06 PDT 2016


On Thu, Jul 21, 2016 at 2:06 PM, Reid Kleckner via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: rnk
> Date: Thu Jul 21 16:06:04 2016
> New Revision: 276334
>
> URL: http://llvm.org/viewvc/llvm-project?rev=276334&view=rev
> Log:
> Fix the clang-cl self-host with VS 2013 headers
>
> std::numeric_limits<int64_t>::max() is not constexpr in VC 2013 headers,
> and Clang complains that it isn't. MSVC 2013 itself is emitting a
> dynamic initializer for this thing. Instead, use an enum.
>
> Modified:
>     llvm/trunk/lib/Analysis/CFLGraph.h
>
> Modified: llvm/trunk/lib/Analysis/CFLGraph.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/CFLGraph.h?rev=276334&r1=276333&r2=276334&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Analysis/CFLGraph.h (original)
> +++ llvm/trunk/lib/Analysis/CFLGraph.h Thu Jul 21 16:06:04 2016
> @@ -27,8 +27,7 @@ namespace cflaa {
>  // We use UnknownOffset to represent pointer offsets that cannot be
> determined
>  // at compile time. Note that MemoryLocation::UnknownSize cannot be used
> here
>  // because we require a signed value.
> -static LLVM_CONSTEXPR int64_t UnknownOffset =
> -    std::numeric_limits<int64_t>::max();
> +enum : int64_t { UnknownOffset = LLONG_MAX };
>

INT64_MAX?


>
>  inline int64_t addOffset(int64_t LHS, int64_t RHS) {
>    if (LHS == UnknownOffset || RHS == UnknownOffset)
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160721/6c72c1b5/attachment.html>


More information about the llvm-commits mailing list