aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBlockPlacement.cpp
diff options
context:
space:
mode:
authorTyker <tyker1@outlook.com>2022-08-16 21:16:34 -0700
committerTyker <tyker1@outlook.com>2022-08-24 09:33:01 -0700
commitbb63d249f8612f87e819071663d81f516a2bec74 (patch)
tree4a8f798e118a22bfa8dfac5139fc3e3b321399a7 /llvm/lib/CodeGen/MachineBlockPlacement.cpp
parentb8055c5115923d0abbcaa2323adc25463610f2b3 (diff)
downloadllvm-bb63d249f8612f87e819071663d81f516a2bec74.zip
llvm-bb63d249f8612f87e819071663d81f516a2bec74.tar.gz
llvm-bb63d249f8612f87e819071663d81f516a2bec74.tar.bz2
[NFC][mlir] Add support for llvm style casting for mlir types
Note: when operating on a Type hierarchy with LeafType inheriting from MiddleType which inherits from mlir::Type. calling LeafType::classof(MiddleType) will always return false. because classof call the static getTypeID from its parent instead of the dynamic Type::getTypeID so classof in this context will check if the TypeID of LeafType is the same as the TypeID of MiddleType which is always false. It is bypassed in this commit inside CastInfo<To, From>::isPossible by calling classof with an mlir::Type. but other unsuspecting users of LeafType::classof(MiddleType) would still get an incorrect result.
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockPlacement.cpp')
0 files changed, 0 insertions, 0 deletions