[all-commits] [llvm/llvm-project] 4bb0ad: Emit strong definition for TypeID storage in Op/Ty...
Mehdi Amini via All-commits
all-commits at lists.llvm.org
Wed Jul 28 16:59:01 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4bb0ad2382a1224c876dfd3671cf994a1a50e10d
https://github.com/llvm/llvm-project/commit/4bb0ad2382a1224c876dfd3671cf994a1a50e10d
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.
Recommit 660a56956c32b0bcd850fc12fa8ad0225a6bb880 after fixing gcc5
build.
Differential Revision: https://reviews.llvm.org/D105903
More information about the All-commits
mailing list