diff options
author | Georgii Rymar <grimar@accesssoftek.com> | 2020-04-15 15:30:21 +0300 |
---|---|---|
committer | Georgii Rymar <grimar@accesssoftek.com> | 2020-04-20 14:54:49 +0300 |
commit | 76e0ab23f683693c05c5baa365365d7abb22d7c8 (patch) | |
tree | 484af17623a645226f032b4400191e08c7b119c0 /llvm/utils/FileCheck/FileCheck.cpp | |
parent | 1c57752ff5e2e5effcedc5da097c4109696f44bb (diff) | |
download | llvm-76e0ab23f683693c05c5baa365365d7abb22d7c8.zip llvm-76e0ab23f683693c05c5baa365365d7abb22d7c8.tar.gz llvm-76e0ab23f683693c05c5baa365365d7abb22d7c8.tar.bz2 |
[FileCheck] - Refactor the code related to string arrays. NFCI.
There are few `std::vector<std::string>` members in
`FileCheckRequest`. This patch changes these arrays to `std::vector<StringRef>`
and refactors the code related to cleanup/improve/simplify it.
Differential revision: https://reviews.llvm.org/D78202
Diffstat (limited to 'llvm/utils/FileCheck/FileCheck.cpp')
-rw-r--r-- | llvm/utils/FileCheck/FileCheck.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/utils/FileCheck/FileCheck.cpp b/llvm/utils/FileCheck/FileCheck.cpp index ef6c62b..3f7d777 100644 --- a/llvm/utils/FileCheck/FileCheck.cpp +++ b/llvm/utils/FileCheck/FileCheck.cpp @@ -562,14 +562,14 @@ int main(int argc, char **argv) { } FileCheckRequest Req; - for (auto Prefix : CheckPrefixes) + for (StringRef Prefix : CheckPrefixes) Req.CheckPrefixes.push_back(Prefix); - for (auto CheckNot : ImplicitCheckNot) + for (StringRef CheckNot : ImplicitCheckNot) Req.ImplicitCheckNot.push_back(CheckNot); bool GlobalDefineError = false; - for (auto G : GlobalDefines) { + for (StringRef G : GlobalDefines) { size_t EqIdx = G.find('='); if (EqIdx == std::string::npos) { errs() << "Missing equal sign in command-line definition '-D" << G |