#include "Configuration.h"
#include "ConfigLexer.h"
#include "CompilerDriver.h"
-#include "Config/config.h"
-#include "Support/CommandLine.h"
-#include "Support/StringExtras.h"
+#include "llvm/Config/config.h"
+#include "llvm/Support/CommandLine.h"
+#include "llvm/ADT/StringExtras.h"
#include <iostream>
#include <fstream>
bool parseSubstitution(CompilerDriver::StringVector& optList) {
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 OUT_SUBST: optList.push_back("%out%"); break;
- case TIME_SUBST: optList.push_back("%time%"); break;
- case STATS_SUBST: optList.push_back("%stats%"); break;
+ case INCLS_SUBST: optList.push_back("%incls%"); break;
+ case LIBS_SUBST: optList.push_back("%libs%"); break;
case OPT_SUBST: optList.push_back("%opt%"); break;
+ case OUT_SUBST: optList.push_back("%out%"); break;
case TARGET_SUBST: optList.push_back("%target%"); break;
- case FORCE_SUBST: optList.push_back("%force%"); break;
+ case STATS_SUBST: optList.push_back("%stats%"); break;
+ case TIME_SUBST: optList.push_back("%time%"); break;
case VERBOSE_SUBST: optList.push_back("%verbose%"); break;
default:
return false;
confFile.set_directory(conf);
confFile.append_file(ftype);
if (!confFile.readable())
- throw "Configuration file for '" + ftype + "' is not available.";
+ throw std::string("Configuration file for '") + ftype +
+ "' is not available.";
} else {
// Try the user's home directory
confFile = sys::Path::GetUserHomeDirectory();
confFile = sys::Path::GetLLVMDefaultConfigDir();
confFile.append_file(ftype);
if (!confFile.readable()) {
- throw "Configuration file for '" + ftype + "' is not available.";
+ throw std::string("Configuration file for '") + ftype +
+ "' is not available.";
}
}
}
confFile = configDir;
confFile.append_file(ftype);
if (!confFile.readable())
- throw "Configuration file for '" + ftype + "' is not available.";
+ throw std::string("Configuration file for '") + ftype +
+ "' is not available.";
}
FileInputProvider fip( confFile.get() );
if (!fip.okay()) {
- throw "Configuration file for '" + ftype + "' is not available.";
+ throw std::string("Configuration file for '") + ftype +
+ "' is not available.";
}
result = new CompilerDriver::ConfigData();
ParseConfigData(fip,*result);