[clang] [CodeGen] Migrate away from PointerUnion::{is, get} (NFC) (PR #118600)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 5 22:25:35 PST 2024
================
@@ -37,8 +37,8 @@ void ConstantInitFuture::abandon() {
void ConstantInitFuture::installInGlobal(llvm::GlobalVariable *GV) {
assert(Data && "installing null future");
- if (Data.is<llvm::Constant*>()) {
- GV->setInitializer(Data.get<llvm::Constant*>());
+ if (auto *C = dyn_cast<llvm::Constant *>(Data)) {
+ GV->setInitializer(C);
} else {
auto &builder = *Data.get<ConstantInitBuilderBase*>();
----------------
kazutakahirata wrote:
Thank you for pointing this out! Fixed.
https://github.com/llvm/llvm-project/pull/118600
More information about the cfe-commits
mailing list