File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -95,21 +95,15 @@ struct AnalysisInfoMixin : PassInfoMixin<DerivedT> {
9595 // / This ID is a pointer type that is guaranteed to be 8-byte aligned and thus
9696 // / suitable for use in sets, maps, and other data structures that use the low
9797 // / bits of pointers.
98- // /
99- // / Note that this requires the derived type provide a static \c AnalysisKey
100- // / member called \c Key.
101- // /
102- // / FIXME: The only reason the mixin type itself can't declare the Key value
103- // / is that some compilers cannot correctly unique a templated static variable
104- // / so it has the same addresses in each instantiation. The only currently
105- // / known platform with this limitation is Windows DLL builds, specifically
106- // / building each part of LLVM as a DLL. If we ever remove that build
107- // / configuration, this mixin can provide the static key as well.
10898 static AnalysisKey *ID () {
10999 static_assert (std::is_base_of<AnalysisInfoMixin, DerivedT>::value,
110100 " Must pass the derived type as the template argument!" );
111101 return &DerivedT::Key;
112102 }
103+
104+ private:
105+ // / Opaque, unique ID for this analysis type.
106+ static constexpr AnalysisKey Key = {};
113107};
114108
115109namespace detail {
You can’t perform that action at this time.
0 commit comments