summaryrefslogtreecommitdiff
path: root/tools/llvmc
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-10-28 04:04:38 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-10-28 04:04:38 +0000
commit3a9b22234ff43c58315c1397d096f78229f85af1 (patch)
tree4b7721e4a95e2faec1242ea8799973716886add9 /tools/llvmc
parent5a7f13b2ae556dcc99f1fb44bb4af86a06ed14e3 (diff)
downloadllvm-3a9b22234ff43c58315c1397d096f78229f85af1.tar.gz
llvm-3a9b22234ff43c58315c1397d096f78229f85af1.tar.bz2
llvm-3a9b22234ff43c58315c1397d096f78229f85af1.tar.xz
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
Diffstat (limited to 'tools/llvmc')
-rw-r--r--tools/llvmc/CompilerDriver.h21
-rw-r--r--tools/llvmc/ConfigLexer.l3
-rw-r--r--tools/llvmc/Configuration.cpp26
3 files changed, 24 insertions, 26 deletions
diff --git a/tools/llvmc/CompilerDriver.h b/tools/llvmc/CompilerDriver.h
index 9068c5c589..e15bc221da 100644
--- a/tools/llvmc/CompilerDriver.h
+++ b/tools/llvmc/CompilerDriver.h
@@ -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
};
/// @}
diff --git a/tools/llvmc/ConfigLexer.l b/tools/llvmc/ConfigLexer.l
index cab02a1eec..6633156eb3 100644
--- a/tools/llvmc/ConfigLexer.l
+++ b/tools/llvmc/ConfigLexer.l
@@ -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); }
diff --git a/tools/llvmc/Configuration.cpp b/tools/llvmc/Configuration.cpp
index 6b5d33975f..6a835e26eb 100644
--- a/tools/llvmc/Configuration.cpp
+++ b/tools/llvmc/Configuration.cpp
@@ -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*