summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2017-12-30 09:15:59 +0000
committerSerge Pavlov <sepavloff@gmail.com>2017-12-30 09:15:59 +0000
commitc15a438a219967135d334a0bee12115d5c5b17b3 (patch)
treedc0e8e26fd111a52b31dcb0d58ae7ea815982308 /llvm/lib/Support/CommandLine.cpp
parent3208588e7afcc8566d683d4efadd80e1b849529d (diff)
downloadbcm5719-llvm-c15a438a219967135d334a0bee12115d5c5b17b3.tar.gz
bcm5719-llvm-c15a438a219967135d334a0bee12115d5c5b17b3.zip
Reverted 321580: Added support for reading configuration files
It caused buildbot fails. llvm-svn: 321582
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r--llvm/lib/Support/CommandLine.cpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index d9059ee908c..4caf4a4fdce 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -873,44 +873,6 @@ void cl::TokenizeWindowsCommandLine(StringRef Src, StringSaver &Saver,
NewArgv.push_back(nullptr);
}
-void cl::tokenizeConfigFile(StringRef Source, StringSaver &Saver,
- SmallVectorImpl<const char *> &NewArgv,
- bool MarkEOLs) {
- for (const char *Cur = Source.begin(); Cur != Source.end();) {
- SmallString<128> Line;
- // Check for comment line.
- if (isWhitespace(*Cur)) {
- while (Cur != Source.end() && isWhitespace(*Cur))
- ++Cur;
- continue;
- }
- if (*Cur == '#') {
- while (Cur != Source.end() && *Cur != '\n')
- ++Cur;
- continue;
- }
- // Find end of the current line.
- const char *Start = Cur;
- for (const char *End = Source.end(); Cur != End; ++Cur) {
- if (*Cur == '\\') {
- if (Cur + 1 != End) {
- ++Cur;
- if (*Cur == '\n' ||
- (*Cur == '\r' && (Cur + 1 != End) && Cur[1] == '\n')) {
- Line.append(Start, Cur - 1);
- Cur += (*Cur == '\r' ? 2 : 1);
- Start = Cur;
- }
- }
- } else if (*Cur == '\n')
- break;
- }
- // Tokenize line.
- Line.append(Start, Cur);
- cl::TokenizeGNUCommandLine(Line, Saver, NewArgv, MarkEOLs);
- }
-}
-
// It is called byte order marker but the UTF-8 BOM is actually not affected
// by the host system's endianness.
static bool hasUTF8ByteOrderMark(ArrayRef<char> S) {
@@ -1015,15 +977,6 @@ bool cl::ExpandResponseFiles(StringSaver &Saver, TokenizerCallback Tokenizer,
return AllExpanded;
}
-bool cl::readConfigFile(StringRef CfgFile, StringSaver &Saver,
- SmallVectorImpl<const char *> &Argv) {
- if (!ExpandResponseFile(CfgFile, Saver, cl::tokenizeConfigFile, Argv,
- /*MarkEOLs*/ false, /*RelativeNames*/ true))
- return false;
- return ExpandResponseFiles(Saver, cl::tokenizeConfigFile, Argv,
- /*MarkEOLs*/ false, /*RelativeNames*/ true);
-}
-
/// ParseEnvironmentOptions - An alternative entry point to the
/// CommandLine library, which allows you to read the program's name
/// from the caller (as PROGNAME) and its command-line arguments from
OpenPOWER on IntegriCloud