[flang-commits] [flang] 0b48b01 - [Flang] flang-omp-report replace std::vector's with llvm::SmallVector
Mats Petersson via flang-commits
flang-commits at lists.llvm.org
Thu Oct 14 03:05:43 PDT 2021
Author: Josh Mottley
Date: 2021-10-14T11:05:24+01:00
New Revision: 0b48b015b5740ac9e91b21ad4e61188e80b211cf
URL: https://github.com/llvm/llvm-project/commit/0b48b015b5740ac9e91b21ad4e61188e80b211cf
DIFF: https://github.com/llvm/llvm-project/commit/0b48b015b5740ac9e91b21ad4e61188e80b211cf.diff
LOG: [Flang] flang-omp-report replace std::vector's with llvm::SmallVector
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
Added:
Modified:
flang/examples/flang-omp-report-plugin/flang-omp-report-visitor.h
Removed:
################################################################################
diff --git a/flang/examples/flang-omp-report-plugin/flang-omp-report-visitor.h b/flang/examples/flang-omp-report-plugin/flang-omp-report-visitor.h
index 90d480407d28b..034f20f7ca563 100644
--- a/flang/examples/flang-omp-report-plugin/flang-omp-report-visitor.h
+++ b/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 @@ 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);
@@ -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
More information about the flang-commits
mailing list