[PATCH] D111709: [Flang] flang-omp-report replace std::vector's with llvm::SmallVector
Josh Mottley via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 13 05:38:52 PDT 2021
josh.mottley.arm created this revision.
josh.mottley.arm added a reviewer: awarzynski.
Herald added a project: Flang.
josh.mottley.arm requested review of this revision.
Herald added subscribers: llvm-commits, jdoerfert.
Herald added a project: LLVM.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D111709
Files:
flang/examples/flang-omp-report-plugin/flang-omp-report-visitor.h
Index: flang/examples/flang-omp-report-plugin/flang-omp-report-visitor.h
===================================================================
--- flang/examples/flang-omp-report-plugin/flang-omp-report-visitor.h
+++ flang/examples/flang-omp-report-plugin/flang-omp-report-visitor.h
@@ -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 {
@@ -37,7 +38,7 @@
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);
@@ -95,9 +96,9 @@
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111709.379354.patch
Type: text/x-patch
Size: 1319 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211013/7fbb1cf7/attachment.bin>
More information about the llvm-commits
mailing list