File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,13 @@ class SwiftDispatcher {
170
170
TrapLabel<TypeTag> fetchLabel (swift::Type t) { return fetchLabel (t.getPointer ()); }
171
171
172
172
TrapLabel<AstNodeTag> fetchLabel (swift::ASTNode node) {
173
- return fetchLabelFromUnion<AstNodeTag>(node);
173
+ auto ret = fetchLabelFromUnion<AstNodeTag>(node);
174
+ if (!ret.valid ()) {
175
+ // TODO to be more useful, we need a generic way of attaching original source location info
176
+ // to logs, this will come in upcoming work
177
+ LOG_ERROR (" Unable to fetch label for ASTNode" );
178
+ }
179
+ return ret;
174
180
}
175
181
176
182
template <typename E, std::enable_if_t <IsStorable<E*>>* = nullptr >
@@ -289,7 +295,6 @@ class SwiftDispatcher {
289
295
// with logical op short-circuiting, this will stop trying on the first successful fetch
290
296
bool unionCaseFound = (... || fetchLabelFromUnionCase<Tag, Ts>(u, ret));
291
297
if (!unionCaseFound) {
292
- // TODO emit error/warning here
293
298
return undefined_label;
294
299
}
295
300
return ret;
You can’t perform that action at this time.
0 commit comments