Swift: small dispatcher fixes

File extraction was not using named trap keys, and `emitDebugInfo` was
using `std::forward` when it should not.
This commit is contained in:
Paolo Tranquilli
2022-07-28 17:05:52 +02:00
parent 8a36a2b563
commit 985237ab2d

View File

@@ -215,7 +215,7 @@ class SwiftDispatcher {
template <typename... Args>
void emitDebugInfo(const Args&... args) {
trap.debug(std::forward<Args>(args)...);
trap.debug(args...);
}
// In order to not emit duplicated entries for declarations, we restrict emission to only
@@ -315,7 +315,7 @@ class SwiftDispatcher {
virtual void visit(swift::TypeBase* type) = 0;
void visit(const FilePath& file) {
auto entry = createEntry(file);
auto entry = createEntry(file, file.path);
entry.name = file.path;
emit(entry);
}