Skip to content

Commit

Permalink
upsie
Browse files Browse the repository at this point in the history
  • Loading branch information
borisbat committed Dec 26, 2020
1 parent 0d1d0a9 commit 52f2cd2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/ast/ast_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -716,9 +716,12 @@ namespace das {

// collect used file info

class FileInfoCollector : public Visitor {
class PromotedInfoCollector : public Visitor {
public:
das_safe_set<FileInfo *> allFileInfo;
PromotedInfoCollector() {
allFileInfo.clear();
}
das_set<FileInfo *> allFileInfo;
protected:
void collect ( LineInfo & at ) {
if ( at.fileInfo ) {
Expand Down Expand Up @@ -802,7 +805,7 @@ namespace das {
builtIn = true;
promoted = true;
// collect info
FileInfoCollector col;
PromotedInfoCollector col;
prog->visit(col);
promotedFileInfo.reserve(col.allFileInfo.size());
for ( auto & fi : col.allFileInfo ) {
Expand Down

0 comments on commit 52f2cd2

Please sign in to comment.