LLVM build fix for VS2017 RC (19.00.24215.1)
Andrew Rogers via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 6 03:17:28 PST 2017
Hi,
I just downloaded VS2017 RC on a clean Win10 machine, checked out LLVM &
clang and tried to build clang.
The following code in
\tools\clang\utils\TableGen\ClangDiagnosticsEmitter.cpp failed to compile:
RecordSet DiagsInPedanticSet;
RecordSet GroupsInPedanticSet;
InferPedantic inferPedantic(DGParentMap, Diags, DiagGroups,
DiagsInGroup);
inferPedantic.compute(&DiagsInPedanticSet, &GroupsInPedanticSet);
auto &PedDiags = DiagsInGroup["pedantic"];
// Put the diagnostics into a deterministic order.
RecordVec DiagsInPedantic(DiagsInPedanticSet.begin(),
DiagsInPedanticSet.end());
because the RecordSet iterators created by DiagsInPedanticSet.begin() and
DiagsInPedanticSet.end() are not const iterators and the VS2017 vector code
tries to use (binary) operator* with one of these iterators, and expects to
get a const ValueT but the compiler can currently only resolve the non-const
operator* on the DenseSet iterator. The patch implements operator* and
operator-> for const ValueT on the iterators in include/llvm/ADT/DenseSet.h.
The attached patch resolves the VS2017 build failure for me - do I need to
run further checks before someone can review/commit it for me?
Note: the fix is in the LLVM repository, not the clang repository.
Thanks, Andrew R
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-2017-build-fix.patch
Type: application/octet-stream
Size: 519 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170106/63532b22/attachment.obj>
More information about the llvm-commits
mailing list