[llvm-commits] [lld] r173125 - /lld/trunk/include/lld/Core/LinkerOptions.h

Chandler Carruth chandlerc at google.com
Mon Jan 21 20:48:58 PST 2013


On Mon, Jan 21, 2013 at 8:12 PM, Shankar Easwaran
<shankare at codeaurora.org>wrote:

> Author: shankare
> Date: Mon Jan 21 22:12:03 2013
> New Revision: 173125
>
> URL: http://llvm.org/viewvc/llvm-project?rev=173125&view=rev
> Log:
> it looks like g++ 4.7.2 doesnot like bit fields when the type is a
> enumeration (Throws an error as bit-field with non integral type)
>

The more common solution is to use an 'unsigned' bitfield and cast the
values back to the enumeration.


>
> Modified:
>     lld/trunk/include/lld/Core/LinkerOptions.h
>
> Modified: lld/trunk/include/lld/Core/LinkerOptions.h
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/LinkerOptions.h?rev=173125&r1=173124&r2=173125&view=diff
>
> ==============================================================================
> --- lld/trunk/include/lld/Core/LinkerOptions.h (original)
> +++ lld/trunk/include/lld/Core/LinkerOptions.h Mon Jan 21 22:12:03 2013
> @@ -174,7 +174,7 @@
>    std::string _outputPath;
>    std::string _entrySymbol;
>    uint64_t _baseAddress;
> -  OutputKind _outputKind : 2;
> +  OutputKind _outputKind;
>    /// \brief -###
>    unsigned _outputCommands : 1;
>    unsigned _outputYAML : 1;
>
>
> _______________________________________________
> 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/20130121/d795b5ae/attachment.html>


More information about the llvm-commits mailing list