summaryrefslogtreecommitdiff
path: root/flang/tools
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2022-08-22 00:30:28 +0700
committerSerge Pavlov <sepavloff@gmail.com>2022-09-29 19:15:01 +0700
commitb934be2c059a99351d08069bb80155e49f047b6e (patch)
tree33588e73b76d19fa692c7b8615837b68855a93fd /flang/tools
parente095c3ed7c26df8c6e95b616549c30099964a3ae (diff)
downloadllvm-b934be2c059a99351d08069bb80155e49f047b6e.tar.gz
[Support] Class for response file expansion (NFC)
Functions that implement expansion of response and config files depend on many options, which are passes as arguments. Extending the expansion requires new options, it in turn causes changing calls in various places making them even more bulky. This change introduces a class ExpansionContext, which represents set of options that control the expansion. Its methods implements expansion of responce files including config files. It makes extending the expansion easier. No functional changes. Differential Revision: https://reviews.llvm.org/D132379
Diffstat (limited to 'flang/tools')
-rw-r--r--flang/tools/flang-driver/driver.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/flang/tools/flang-driver/driver.cpp b/flang/tools/flang-driver/driver.cpp
index 1fee09d1df85..3ab6fc620501 100644
--- a/flang/tools/flang-driver/driver.cpp
+++ b/flang/tools/flang-driver/driver.cpp
@@ -76,7 +76,8 @@ static void ExpandResponseFiles(
llvm::StringSaver &saver, llvm::SmallVectorImpl<const char *> &args) {
// We're defaulting to the GNU syntax, since we don't have a CL mode.
llvm::cl::TokenizerCallback tokenizer = &llvm::cl::TokenizeGNUCommandLine;
- llvm::cl::ExpandResponseFiles(saver, tokenizer, args, /* MarkEOLs=*/false);
+ llvm::cl::ExpansionContext ExpCtx(saver.getAllocator(), tokenizer);
+ ExpCtx.expandResponseFiles(args);
}
int main(int argc, const char **argv) {