diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-08-22 18:03:25 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-08-22 18:03:25 +0000 |
commit | 59a745a26f035f4d3ca51b362ae72880d361429b (patch) | |
tree | 30a0dcfc52208ed436405310de96c0720e3d3ce9 /tools/llvmc/Configuration.cpp | |
parent | c0e9bec9fc000584947045800239b3fb0f44bc84 (diff) |
Provide support for retaining the version number found in a config file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15995 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvmc/Configuration.cpp')
-rw-r--r-- | tools/llvmc/Configuration.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/llvmc/Configuration.cpp b/tools/llvmc/Configuration.cpp index a381d56e1c..a3c62d6116 100644 --- a/tools/llvmc/Configuration.cpp +++ b/tools/llvmc/Configuration.cpp @@ -181,6 +181,18 @@ namespace { error("Expecting '='"); } + void parseVersion() { + if (next() == EQUALS) { + while (next_is_real()) { + if (token == STRING || token == OPTION) + confDat->version = ConfigLexerState.StringVal; + else + error("Expecting a version string"); + } + } else + error("Expecting '='"); + } + void parseLang() { switch (next() ) { case NAME: @@ -357,6 +369,7 @@ namespace { void parseAssignment() { switch (token) { + case VERSION: parseVersion(); break; case LANG: parseLang(); break; case PREPROCESSOR: parsePreprocessor(); break; case TRANSLATOR: parseTranslator(); break; |