mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-30 19:43:13 +01:00
Update to work with LLVM 2.7.
Removed use of dyn_cast, llvm no compiles without exceptions and rtti by default. We do need exceptions for the libconfig stuff, but rtti isn't necessary (anymore). Debug info needs to be rewritten, as in LLVM 2.7 the format has completely changed. To have something to look at while rewriting, the old code has been wrapped inside #ifndef DISABLE_DEBUG_INFO , this means that you have to define this to compile at the moment. Updated tango 0.99.9 patch to include updated EH runtime code, which is needed for LLVM 2.7 as well.
This commit is contained in:
@@ -94,7 +94,7 @@ bool ConfigFile::locate(sys::Path& p, const char* argv0, void* mainAddr, const c
|
||||
p.appendComponent(filename);
|
||||
if (p.exists())
|
||||
return true;
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -102,14 +102,14 @@ bool ConfigFile::read(const char* argv0, void* mainAddr, const char* filename)
|
||||
{
|
||||
sys::Path p;
|
||||
if (!locate(p, argv0, mainAddr, filename))
|
||||
{
|
||||
{
|
||||
// failed to find cfg, users still have the DFLAGS environment var
|
||||
std::cerr << "Error failed to locate the configuration file: " << filename << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// save config file path for -v output
|
||||
pathstr = p.toString();
|
||||
pathstr = p.str();
|
||||
|
||||
try
|
||||
{
|
||||
@@ -141,12 +141,12 @@ bool ConfigFile::read(const char* argv0, void* mainAddr, const char* filename)
|
||||
for (int i=0; i<len; i++)
|
||||
{
|
||||
std::string v = arr[i];
|
||||
|
||||
|
||||
// replace binpathkey with binpath
|
||||
size_t p;
|
||||
while (std::string::npos != (p = v.find(binpathkey)))
|
||||
v.replace(p, binpathkey.size(), binpath);
|
||||
|
||||
|
||||
switches.push_back(strdup(v.c_str()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user