Skip to content

Commit

Permalink
[Flang] flang-omp-report replace std::vector's with llvm::SmallVector
Browse files Browse the repository at this point in the history
This patch replaces all uses of std::vector with llvm::SmallVector in the flang-omp-report plugin.
This is a one of several patches focusing on switching containers from STL to LLVM's ADT library.

Reviewed By: Leporacanthicus

Differential Revision: https://reviews.llvm.org/D111709
  • Loading branch information
Sezoir authored and Leporacanthicus committed Oct 14, 2021
1 parent eaa5275 commit 0b48b01
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
#include "flang/Parser/parse-tree.h"
#include "flang/Parser/parsing.h"

#include "llvm/ADT/SmallVector.h"

#include <deque>
#include <map>
#include <string>
#include <vector>

namespace Fortran {
namespace parser {
Expand All @@ -37,7 +38,7 @@ struct LogRecord {
std::string file;
int line;
std::string construct;
std::vector<ClauseInfo> clauses;
llvm::SmallVector<ClauseInfo> clauses;
};
bool operator==(const LogRecord &a, const LogRecord &b);
bool operator!=(const LogRecord &a, const LogRecord &b);
Expand Down Expand Up @@ -95,9 +96,9 @@ struct OpenMPCounterVisitor {
std::deque<LogRecord> constructClauses;

LogRecord *curLoopLogRecord{nullptr};
std::vector<LogRecord *> loopLogRecordStack;
std::vector<OmpWrapperType *> ompWrapperStack;
std::map<OmpWrapperType *, std::vector<ClauseInfo>> clauseStrings;
llvm::SmallVector<LogRecord *> loopLogRecordStack;
llvm::SmallVector<OmpWrapperType *> ompWrapperStack;
std::map<OmpWrapperType *, llvm::SmallVector<ClauseInfo>> clauseStrings;
Parsing *parsing{nullptr};
};
} // namespace parser
Expand Down

0 comments on commit 0b48b01

Please sign in to comment.