Skip to content

Commit 63db25e

Browse files
committed
[ownership] When erroring since we visited an instruction that we should never visit, dump the instruction.
1 parent 2dfd569 commit 63db25e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/SIL/OperandOwnership.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ class OperandOwnershipKindClassifier
110110
#define SHOULD_NEVER_VISIT_INST(INST) \
111111
OperandOwnershipKindMap OperandOwnershipKindClassifier::visit##INST##Inst( \
112112
INST##Inst *i) { \
113-
llvm_unreachable("Visited instruction that should never be visited?!"); \
113+
llvm::errs() << "Unhandled inst: " << *i; \
114+
llvm::report_fatal_error( \
115+
"Visited instruction that should never be visited?!"); \
114116
}
115117
SHOULD_NEVER_VISIT_INST(AllocBox)
116118
SHOULD_NEVER_VISIT_INST(AllocExistentialBox)

0 commit comments

Comments
 (0)