[clang] [CodeGen] Migrate away from PointerUnion::{is, get} (NFC) (PR #118600)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 4 00:38:22 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*>();
----------------
nikic wrote:

Leftover get here?

https://github.com/llvm/llvm-project/pull/118600


More information about the cfe-commits mailing list