diff --git a/mlir/include/mlir/Support/TypeID.h b/mlir/include/mlir/Support/TypeID.h --- a/mlir/include/mlir/Support/TypeID.h +++ b/mlir/include/mlir/Support/TypeID.h @@ -20,6 +20,10 @@ namespace mlir { +namespace detail { +struct TypeIDExported; +} // namespace detail + /// This class provides an efficient unique identifier for a specific C++ type. /// This allows for a C++ type to be compared, hashed, and stored in an opaque /// context. This class is similar in some ways to std::type_index, but can be @@ -62,19 +66,10 @@ bool operator!=(const TypeID &other) const { return !(*this == other); } /// Construct a type info object for the given type T. - /// TODO: This currently won't work when using DLLs as it requires properly - /// attaching dllimport and dllexport. Fix this when that information is - /// available within LLVM. template - LLVM_EXTERNAL_VISIBILITY static TypeID get() { - static Storage instance; - return TypeID(&instance); - } + static TypeID get(); template