mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 08:01:11 +03:00
Merge of 2.065.0-b3.
The new visitor class is used for IR generation. This removes some modifications from DMD source.
This commit is contained in:
parent
27c0785ec4
commit
fe39da53e3
121 changed files with 14041 additions and 13679 deletions
|
@ -11,7 +11,7 @@
|
|||
#include "mars.h"
|
||||
#include "llvm/Support/Program.h"
|
||||
|
||||
int executeToolAndWait(const std::string &tool, std::vector<std::string> const &args, bool verbose)
|
||||
int executeToolAndWait(const std::string &tool, std::vector<std::string> const &args, bool verbose)
|
||||
{
|
||||
// Construct real argument list.
|
||||
// First entry is the tool itself, last entry must be NULL.
|
||||
|
@ -37,15 +37,15 @@ int executeToolAndWait(const std::string &tool, std::vector<std::string> const &
|
|||
// Execute tool.
|
||||
std::string errstr;
|
||||
#if LDC_LLVM_VER >= 304
|
||||
if (int status = llvm::sys::ExecuteAndWait(tool, &realargs[0], NULL, NULL, 0, 0, &errstr))
|
||||
if (int status = llvm::sys::ExecuteAndWait(tool, &realargs[0], NULL, NULL, 0, 0, &errstr))
|
||||
#else
|
||||
llvm::sys::Path toolpath(tool);
|
||||
if (int status = llvm::sys::Program::ExecuteAndWait(toolpath, &realargs[0], NULL, NULL, 0, 0, &errstr))
|
||||
llvm::sys::Path toolpath(tool);
|
||||
if (int status = llvm::sys::Program::ExecuteAndWait(toolpath, &realargs[0], NULL, NULL, 0, 0, &errstr))
|
||||
#endif
|
||||
{
|
||||
error("%s failed with status: %d", tool.c_str(), status);
|
||||
error(Loc(), "%s failed with status: %d", tool.c_str(), status);
|
||||
if (!errstr.empty())
|
||||
error("message: %s", errstr.c_str());
|
||||
error(Loc(), "message: %s", errstr.c_str());
|
||||
return status;
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue