Skip to content

Commit dea4e61

Browse files
[CodeGen] Migrate away from PointerUnion::dyn_cast (NFC) (#123157)
Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with // isa<T>, cast<T> and the llvm::dyn_cast<T> Literal migration would result in dyn_cast_if_present (see the definition of PointerUnion::dyn_cast), but this patch uses dyn_cast because we expect Data to be nonnull.
1 parent c969964 commit dea4e61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/CodeGen/ConstantInitBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ llvm::Type *ConstantInitFuture::getType() const {
2929

3030
void ConstantInitFuture::abandon() {
3131
assert(Data && "abandoning null future");
32-
if (auto builder = Data.dyn_cast<ConstantInitBuilderBase*>()) {
32+
if (auto *builder = dyn_cast<ConstantInitBuilderBase *>(Data)) {
3333
builder->abandon(0);
3434
}
3535
Data = nullptr;

0 commit comments

Comments
 (0)