Eliminate the force flag, configuration item, and related support

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17296 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2004-10-28 04:04:38 +00:00
parent 5a7f13b2ae
commit 3a9b22234f
3 changed files with 24 additions and 26 deletions

View 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
};
/// @}

View 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); }

View 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*