[PATCH][AArch64]Fix the Cygwin build failure caused by questionable enum values in AArch64BaseInfo.h

Hao Liu haoliuts at gmail.com
Wed Nov 20 21:23:33 PST 2013


Hi,

Eric found a build failure on Cygwin caused by enum value names started
with a '_'.

This simple patch renams such values and will solve the problem. As this
patch only renames the values in enum, we don't need any additional test
cases. As this is only a very simple patch, I don't know whether it needs
code review.

If it is OK, I'll commit it to the trunk.

Thanks,
-Hao

---------- Forwarded message ----------
From: Eric Niebler <eniebler at boost.org>
Date: 2013/11/20
Subject: [cfe-dev] build failure: AArch64BaseInfo.h has questionable enumvalues
To: cfe-dev at cs.uiuc.edu


lib/Target/AArch64/Utils/
AArch64BaseInfo.h has the following enum:

namespace A64Layout {
    enum VectorLayout {
        Invalid = -1,
/*...*
        // Bare layout for the 128-bit vector
        // (only show ".b", ".h", ".s", ".d" without vector number)
        _B,
        _H,
        _S,
        _D
    };
}

My build on cygwin fails because _B and _S are platform macros. Besides,
in C++ identifiers with a leading underscore-capital are reserved. I
suggest changing these four.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131121/1ff829a7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rename_VLayout.patch
Type: text/x-patch
Size: 6101 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131121/1ff829a7/attachment.bin>


More information about the llvm-commits mailing list