Skip to content

Commit 2e23575

Browse files
committed
Fix a -debug-only=silgen crash.
1 parent bf4f284 commit 2e23575

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SILGen/SILGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ void SILGenModule::preEmitFunction(SILDeclRef constant,
640640
F->getLoweredType().print(llvm::dbgs());
641641
llvm::dbgs() << '\n';
642642
if (astNode) {
643-
if (auto *decl = astNode.get<ValueDecl *>())
643+
if (auto *decl = astNode.dyn_cast<ValueDecl *>())
644644
decl->dump(llvm::dbgs());
645645
else
646646
astNode.get<Expr *>()->dump(llvm::dbgs());

0 commit comments

Comments
 (0)