[all-commits] [llvm/llvm-project] b349d4: Emit strong definition for TypeID storage in Op/Ty...
Mehdi Amini via All-commits
all-commits at lists.llvm.org
Tue Jul 27 22:38:58 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b349d4c5e1852091aad97d3750e286493cac7178
https://github.com/llvm/llvm-project/commit/b349d4c5e1852091aad97d3750e286493cac7178
Author: Mehdi Amini <joker.eph at gmail.com>
Date: 2021-07-28 (Wed, 28 Jul 2021)
Changed paths:
M mlir/include/mlir/Support/TypeID.h
M mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp
M mlir/tools/mlir-tblgen/DialectGen.cpp
M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
Log Message:
-----------
Emit strong definition for TypeID storage in Op/Type/Attributes definition
By making an explicit template specialization for the TypeID provided by these classes,
the compiler will not emit an inline weak definition and rely on the linker to unique it.
Instead a single definition will be emitted in the C++ file alongside the implementation
for these classes. That will turn into a linker error what is now a hard-to-debug runtime
behavior where instances of the same class may be using a different TypeID inside of
different DSOs.
Differential Revision: https://reviews.llvm.org/D105903
More information about the All-commits
mailing list