[PATCH] D131777: [ADT] Mark variable inline to avoid ODR violations in Sequence.h
Joe Loser via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 12 07:17:24 PDT 2022
jloser created this revision.
jloser added reviewers: kuhar, gchatelet.
Herald added a project: All.
jloser requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Mark `force_iteration_on_noniterable_enum` as an `inline` variable
to avoid ODR violations.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D131777
Files:
llvm/include/llvm/ADT/Sequence.h
Index: llvm/include/llvm/ADT/Sequence.h
===================================================================
--- llvm/include/llvm/ADT/Sequence.h
+++ llvm/include/llvm/ADT/Sequence.h
@@ -104,8 +104,7 @@
explicit force_iteration_on_noniterable_enum_t() = default;
};
-// TODO: Make this `inline` once we update to C++17 to avoid ORD violations.
-constexpr force_iteration_on_noniterable_enum_t
+inline constexpr force_iteration_on_noniterable_enum_t
force_iteration_on_noniterable_enum;
namespace detail {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131777.452178.patch
Type: text/x-patch
Size: 518 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220812/01644360/attachment.bin>
More information about the llvm-commits
mailing list