[llvm-commits] CVS: llvm/tools/llvmc/CompilerDriver.h Configuration.cpp
Reid Spencer
reid at x10sys.com
Sun Aug 22 11:03:36 PDT 2004
Changes in directory llvm/tools/llvmc:
CompilerDriver.h updated: 1.6 -> 1.7
Configuration.cpp updated: 1.8 -> 1.9
---
Log message:
Provide support for retaining the version number found in a config file.
---
Diffs of the changes: (+14 -0)
Index: llvm/tools/llvmc/CompilerDriver.h
diff -u llvm/tools/llvmc/CompilerDriver.h:1.6 llvm/tools/llvmc/CompilerDriver.h:1.7
--- llvm/tools/llvmc/CompilerDriver.h:1.6 Wed Aug 18 23:49:47 2004
+++ llvm/tools/llvmc/CompilerDriver.h Sun Aug 22 13:03:25 2004
@@ -89,6 +89,7 @@
struct ConfigData {
ConfigData();
+ std::string version; ///< The version number.
std::string langName; ///< The name of the source language
StringTable opts; ///< The o10n options for each level
Action PreProcessor; ///< PreProcessor command line
Index: llvm/tools/llvmc/Configuration.cpp
diff -u llvm/tools/llvmc/Configuration.cpp:1.8 llvm/tools/llvmc/Configuration.cpp:1.9
--- llvm/tools/llvmc/Configuration.cpp:1.8 Fri Aug 20 17:53:11 2004
+++ llvm/tools/llvmc/Configuration.cpp Sun Aug 22 13:03:25 2004
@@ -181,6 +181,18 @@
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 @@
void parseAssignment() {
switch (token) {
+ case VERSION: parseVersion(); break;
case LANG: parseLang(); break;
case PREPROCESSOR: parsePreprocessor(); break;
case TRANSLATOR: parseTranslator(); break;
More information about the llvm-commits
mailing list