[llvm] r193106 - Fix the build in DIE.cpp with MSVC 2010
David Blaikie
dblaikie at gmail.com
Mon Oct 21 13:22:14 PDT 2013
I could be wrong, but I don't think we have many casts like(this), and
generally use casts (like)this.
On Mon, Oct 21, 2013 at 12:18 PM, Reid Kleckner <reid at kleckner.net> wrote:
> Author: rnk
> Date: Mon Oct 21 14:18:31 2013
> New Revision: 193106
>
> URL: http://llvm.org/viewvc/llvm-project?rev=193106&view=rev
> Log:
> Fix the build in DIE.cpp with MSVC 2010
>
> Modified:
> llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp
>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp?rev=193106&r1=193105&r2=193106&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp Mon Oct 21 14:18:31 2013
> @@ -34,8 +34,10 @@ using namespace llvm;
> /// Profile - Used to gather unique data for the abbreviation folding set.
> ///
> void DIEAbbrevData::Profile(FoldingSetNodeID &ID) const {
> - ID.AddInteger(Attribute);
> - ID.AddInteger(Form);
> + // Explicitly cast to an integer type for which FoldingSetNodeID has
> + // overloads. Otherwise MSVC 2010 thinks this call is ambiguous.
> + ID.AddInteger(unsigned(Attribute));
> + ID.AddInteger(unsigned(Form));
> }
>
>
> //===----------------------------------------------------------------------===//
> @@ -45,7 +47,7 @@ void DIEAbbrevData::Profile(FoldingSetNo
> /// Profile - Used to gather unique data for the abbreviation folding set.
> ///
> void DIEAbbrev::Profile(FoldingSetNodeID &ID) const {
> - ID.AddInteger(Tag);
> + ID.AddInteger(unsigned(Tag));
> ID.AddInteger(ChildrenFlag);
>
> // For each attribute description.
>
>
> _______________________________________________
> 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/20131021/8d10ebdb/attachment.html>
More information about the llvm-commits
mailing list