[llvm-commits] [PATCH] Add declaration of hash_value in APFloat / APInt (required for xlC on AIX)
Chris Lattner
clattner at apple.com
Sat Oct 27 21:07:45 PDT 2012
Seems fine to me,
-Chris
On Oct 27, 2012, at 9:29 AM, Kai <kai at redstar.de> wrote:
> Hi!
>
> I am trying to compile LLVM with the IBM xlC compiler on AIX 7.1 The first issue I encounter is that the function hash_value() is declared as a friend of APFloat and APInt, but no matching declaration is provided. This results in the error message:
>
> "../llvm-git/lib/Support/APFloat.cpp", line 2731.11: 1540-0432 (S) The qualified declarator "llvm::hash_value" must refer to an existing declaration.
>
> The draft standard says in section 7.3.1.2 "Namespace member definitions":
>
> "... If a friend declaration in a non-local class first declares a class or function95 the friend class or function is a member of the innermost enclosing namespace. The name of the friend is not found by unqualified lookup (3.4.1) or by qualified lookup (3.4.3) until a matching declaration is provided in that namespace scope (either before or after the class definition granting friendship). ..."
>
> I conclude that the declaration is required for conformance with the C++ standard. The attached patch resolves the problem.
>
> Please review and commit if it looks good.
>
> Regards
> Kai
>
>
>
> <adt_decl.diff>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list