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 {
170170 TrapLabel<TypeTag> fetchLabel (swift::Type t) { return fetchLabel (t.getPointer ()); }
171171
172172 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;
174180 }
175181
176182 template <typename E, std::enable_if_t <IsStorable<E*>>* = nullptr >
@@ -289,7 +295,6 @@ class SwiftDispatcher {
289295 // with logical op short-circuiting, this will stop trying on the first successful fetch
290296 bool unionCaseFound = (... || fetchLabelFromUnionCase<Tag, Ts>(u, ret));
291297 if (!unionCaseFound) {
292- // TODO emit error/warning here
293298 return undefined_label;
294299 }
295300 return ret;
You can’t perform that action at this time.
0 commit comments