LLVM 20.0.0git
|
Contains options that control response file expansion. More...
#include "llvm/Support/CommandLine.h"
Public Member Functions | |
ExpansionContext (BumpPtrAllocator &A, TokenizerCallback T) | |
ExpansionContext & | setMarkEOLs (bool X) |
ExpansionContext & | setRelativeNames (bool X) |
ExpansionContext & | setCurrentDir (StringRef X) |
ExpansionContext & | setSearchDirs (ArrayRef< StringRef > X) |
ExpansionContext & | setVFS (vfs::FileSystem *X) |
bool | findConfigFile (StringRef FileName, SmallVectorImpl< char > &FilePath) |
Looks for the specified configuration file. | |
Error | readConfigFile (StringRef CfgFile, SmallVectorImpl< const char * > &Argv) |
Reads command line options from the given configuration file. | |
Error | expandResponseFiles (SmallVectorImpl< const char * > &Argv) |
Expands constructs "@file" in the provided array of arguments recursively. | |
Contains options that control response file expansion.
Definition at line 2146 of file CommandLine.h.
ExpansionContext::ExpansionContext | ( | BumpPtrAllocator & | A, |
TokenizerCallback | T | ||
) |
Definition at line 1386 of file CommandLine.cpp.
Error ExpansionContext::expandResponseFiles | ( | SmallVectorImpl< const char * > & | Argv | ) |
Expands constructs "@file" in the provided array of arguments recursively.
Expand response files on a command line recursively using the given StringSaver and tokenization strategy.
Definition at line 1234 of file CommandLine.cpp.
References llvm::sys::path::append(), assert(), llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallString< InternalLen >::c_str(), llvm::createStringError(), llvm::drop_begin(), llvm::StringRef::empty(), llvm::SmallVectorTemplateCommon< T, typename >::end(), End, llvm::vfs::Status::equivalent(), llvm::SmallVectorImpl< T >::erase(), F, llvm::ErrorOr< T >::get(), llvm::vfs::FileSystem::getCurrentWorkingDirectory(), llvm::ErrorOr< T >::getError(), I, llvm::SmallVectorImpl< T >::insert(), llvm::sys::path::is_relative(), llvm::no_such_file_or_directory, llvm::SmallVectorTemplateBase< T, bool >::pop_back(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), RHS, llvm::SmallVectorBase< Size_T >::size(), llvm::vfs::FileSystem::status(), and llvm::Error::success().
Referenced by llvm::cl::expandResponseFiles(), llvm::cl::ExpandResponseFiles(), and readConfigFile().
bool ExpansionContext::findConfigFile | ( | StringRef | FileName, |
SmallVectorImpl< char > & | FilePath | ||
) |
Looks for the specified configuration file.
[in] | FileName | Name of the file to search for. |
[out] | FilePath | File absolute path, if it was found. |
If the specified file name contains a directory separator, it is searched for by its absolute path. Otherwise looks for file sequentially in directories specified by SearchDirs field.
Definition at line 1389 of file CommandLine.cpp.
References llvm::sys::path::append(), llvm::SmallVectorImpl< T >::assign(), llvm::SmallString< InternalLen >::assign(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::sys::path::has_parent_path(), llvm::sys::path::is_relative(), llvm::vfs::FileSystem::makeAbsolute(), llvm::sys::path::native, llvm::sys::fs::regular_file, and llvm::vfs::FileSystem::status().
Error ExpansionContext::readConfigFile | ( | StringRef | CfgFile, |
SmallVectorImpl< const char * > & | Argv | ||
) |
Reads command line options from the given configuration file.
[in] | CfgFile | Path to configuration file. |
[out] | Argv | Array to which the read options are added. |
It reads content of the specified file, tokenizes it and expands "@file" commands resolving file names in them relative to the directory where CfgFilename resides. It also expands "<CFGDIR>" to the base path of the current config file.
Definition at line 1426 of file CommandLine.cpp.
References llvm::SmallString< InternalLen >::assign(), expandResponseFiles(), llvm::sys::path::is_relative(), llvm::vfs::FileSystem::makeAbsolute(), and llvm::SmallString< InternalLen >::str().
|
inline |
Definition at line 2190 of file CommandLine.h.
References X.
|
inline |
Definition at line 2180 of file CommandLine.h.
References X.
|
inline |
Definition at line 2185 of file CommandLine.h.
References X.
|
inline |
Definition at line 2195 of file CommandLine.h.
References X.
|
inline |
Definition at line 2200 of file CommandLine.h.
References X.