summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2016-11-01 06:53:29 +0000
committerSerge Pavlov <sepavloff@gmail.com>2016-11-01 06:53:29 +0000
commit6ac8e034f654db00a7eb680f8ee91839ed9c5b5a (patch)
treef69e20a09f35cb356db43ec187e792c16daadd84 /llvm/include
parent28b4d5133c1161868d63644e73ddeb78fc361f48 (diff)
downloadbcm5719-llvm-6ac8e034f654db00a7eb680f8ee91839ed9c5b5a.tar.gz
bcm5719-llvm-6ac8e034f654db00a7eb680f8ee91839ed9c5b5a.zip
Allow resolving response file names relative to including file
If a response file included by construct @file itself includes a response file and that file is specified by relative file name, current behavior is to resolve the name relative to the current working directory. The change adds additional flag to ExpandResponseFiles that may be used to resolve nested response file names relative to including file. With the new mode a set of related response files may be kept together and reference each other with short position independent names. Differential Revision: https://reviews.llvm.org/D24917 llvm-svn: 285675
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Support/CommandLine.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h
index 692e16df041..fc675930760 100644
--- a/llvm/include/llvm/Support/CommandLine.h
+++ b/llvm/include/llvm/Support/CommandLine.h
@@ -1803,10 +1803,12 @@ typedef void (*TokenizerCallback)(StringRef Source, StringSaver &Saver,
/// \param [in,out] Argv Command line into which to expand response files.
/// \param [in] MarkEOLs Mark end of lines and the end of the response file
/// with nullptrs in the Argv vector.
+/// \param [in] RelativeNames true if names of nested response files must be
+/// resolved relative to including file.
/// \return true if all @files were expanded successfully or there were none.
bool ExpandResponseFiles(StringSaver &Saver, TokenizerCallback Tokenizer,
SmallVectorImpl<const char *> &Argv,
- bool MarkEOLs = false);
+ bool MarkEOLs = false, bool RelativeNames = false);
/// \brief Mark all options not part of this category as cl::ReallyHidden.
///
OpenPOWER on IntegriCloud