Eliminate the force flag, configuration item, and related support
authorReid Spencer <rspencer@reidspencer.com>
Thu, 28 Oct 2004 04:04:38 +0000 (04:04 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Thu, 28 Oct 2004 04:04:38 +0000 (04:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17296 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvmc/CompilerDriver.h
tools/llvmc/ConfigLexer.l
tools/llvmc/Configuration.cpp

index 9068c5c589d88f6bf84fff4f683d5dad0684ebe9..e15bc221da718595b477c5edc458f107ce375e9a 100644 (file)
@@ -120,17 +120,16 @@ namespace llvm {
       /// @brief Driver specific flags
       enum DriverFlags {
         DRY_RUN_FLAG         = 0x0001, ///< Do everything but execute actions
-        FORCE_FLAG           = 0x0002, ///< Force overwrite of output files
-        VERBOSE_FLAG         = 0x0004, ///< Print each action
-        DEBUG_FLAG           = 0x0008, ///< Print debug information
-        TIME_PASSES_FLAG     = 0x0010, ///< Time the passes as they execute
-        TIME_ACTIONS_FLAG    = 0x0020, ///< Time the actions as they execute
-        SHOW_STATS_FLAG      = 0x0040, ///< Show pass statistics
-        EMIT_NATIVE_FLAG     = 0x0080, ///< Emit native code instead of bc
-        EMIT_RAW_FLAG        = 0x0100, ///< Emit raw, unoptimized bytecode
-        KEEP_TEMPS_FLAG      = 0x0200, ///< Don't delete temporary files
-        STRIP_OUTPUT_FLAG    = 0x0400, ///< Strip symbols from linked output
-        DRIVER_FLAGS_MASK    = 0x07FF, ///< Union of the above flags
+        VERBOSE_FLAG         = 0x0002, ///< Print each action
+        DEBUG_FLAG           = 0x0004, ///< Print debug information
+        TIME_PASSES_FLAG     = 0x0008, ///< Time the passes as they execute
+        TIME_ACTIONS_FLAG    = 0x0010, ///< Time the actions as they execute
+        SHOW_STATS_FLAG      = 0x0020, ///< Show pass statistics
+        EMIT_NATIVE_FLAG     = 0x0040, ///< Emit native code instead of bc
+        EMIT_RAW_FLAG        = 0x0080, ///< Emit raw, unoptimized bytecode
+        KEEP_TEMPS_FLAG      = 0x0100, ///< Don't delete temporary files
+        STRIP_OUTPUT_FLAG    = 0x0200, ///< Strip symbols from linked output
+        DRIVER_FLAGS_MASK    = 0x03FF, ///< Union of the above flags
       };
 
     /// @}
index cab02a1eec7d165f3edd6f8654f7d69ebe2afdd3..6633156eb334b68f1b259449b76bbfd25a627948 100644 (file)
@@ -134,7 +134,7 @@ White           [ \t]*
                   return EQUALS; 
                 }
 
-{VERSION}       { return handleNameContext(VERSION); }
+{VERSION}       { return handleNameContext(VERSION_TOK); }
 
 {LANG}          { return handleNameContext(LANG); }
 {NAME}          { return handleNameContext(NAME); }
@@ -161,7 +161,6 @@ White           [ \t]*
 
 %args%          { return handleSubstitution(ARGS_SUBST); }
 %defs%          { return handleSubstitution(DEFS_SUBST); }
-%force%         { return handleSubstitution(FORCE_SUBST); }
 %in%            { return handleSubstitution(IN_SUBST); }
 %incls%         { return handleSubstitution(INCLS_SUBST); }
 %libs%          { return handleSubstitution(LIBS_SUBST); }
index 6b5d33975f2c0a4f2a57c0e5317bf772f5661dc5..6a835e26eb2d7f04a825af0a60413a5183fe2ec9 100644 (file)
@@ -71,8 +71,8 @@ namespace {
       std::ifstream F;
   };
 
-  cl::opt<bool> DumpTokens("dump-tokens", cl::Optional, cl::Hidden, cl::init(false),
-    cl::desc("Dump lexical tokens (debug use only)."));
+  cl::opt<bool> DumpTokens("dump-tokens", cl::Optional, cl::Hidden, 
+    cl::init(false), cl::desc("Dump lexical tokens (debug use only)."));
 
   struct Parser
   {
@@ -157,7 +157,6 @@ namespace {
       switch (token) {
         case ARGS_SUBST:        optList.push_back("%args%"); break;
         case DEFS_SUBST:        optList.push_back("%defs%"); break;
-        case FORCE_SUBST:       optList.push_back("%force%"); break;
         case IN_SUBST:          optList.push_back("%in%"); break;
         case INCLS_SUBST:       optList.push_back("%incls%"); break;
         case LIBS_SUBST:        optList.push_back("%libs%"); break;
@@ -349,8 +348,8 @@ namespace {
             confDat->Translator.clear(CompilerDriver::OUTPUT_IS_ASM_FLAG);
           break;
         default:
-          error(std::string("Expecting 'command', 'preprocesses', ") +
-              "'translates' or 'output' but found '" + 
+          error(std::string("Expecting 'command', 'preprocesses', " 
+              "'translates' or 'output' but found '") + 
               ConfigLexerState.StringVal + "' instead");
           break;
       }
@@ -381,7 +380,7 @@ namespace {
 
     void parseAssignment() {
       switch (token) {
-        case VERSION:       parseVersion(); break;
+        case VERSION_TOK:   parseVersion(); break;
         case LANG:          parseLang(); break;
         case PREPROCESSOR:  parsePreprocessor(); break;
         case TRANSLATOR:    parseTranslator(); break;
@@ -407,14 +406,15 @@ namespace {
     }
   };
 
-  void
-  ParseConfigData(InputProvider& provider, CompilerDriver::ConfigData& confDat) {
-    Parser p;
-    p.token = EOFTOK;
-    p.provider = &provider;
-    p.confDat = &confDat;
-    p.parseFile();
+void
+ParseConfigData(InputProvider& provider, CompilerDriver::ConfigData& confDat) {
+  Parser p;
+  p.token = EOFTOK;
+  p.provider = &provider;
+  p.confDat = &confDat;
+  p.parseFile();
   }
+
 }
 
 CompilerDriver::ConfigData*