mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-30 07:00:46 +03:00
Fixed compilation of ldc1
This commit is contained in:
parent
f4d8021e5a
commit
8c5cf40bb5
2 changed files with 4 additions and 1 deletions
|
@ -13,6 +13,7 @@
|
|||
#include "llvm/Transforms/IPO.h"
|
||||
|
||||
#include "mars.h" // error()
|
||||
#include "root.h"
|
||||
#include <cstring> // strcmp();
|
||||
|
||||
using namespace llvm;
|
||||
|
|
|
@ -239,7 +239,9 @@ DValue* VarExp::toElem(IRState* p)
|
|||
{
|
||||
Logger::println("FuncDeclaration");
|
||||
LLValue* func = 0;
|
||||
#if DMDV2
|
||||
fdecl = fdecl->toAliasFunc();
|
||||
#endif
|
||||
if (fdecl->llvmInternal == LLVMinline_asm) {
|
||||
error("special ldc inline asm is not a normal function");
|
||||
fatal();
|
||||
|
@ -3007,6 +3009,7 @@ DValue* AssocArrayLiteralExp::toElem(IRState* p)
|
|||
Type* aatype = basetype;
|
||||
Type* vtype = aatype->nextOf();
|
||||
|
||||
#if DMDV2
|
||||
if (!keys->dim)
|
||||
goto LruntimeInit;
|
||||
|
||||
|
@ -3018,7 +3021,6 @@ DValue* AssocArrayLiteralExp::toElem(IRState* p)
|
|||
aatype = aatype->semantic(loc, NULL);
|
||||
}
|
||||
|
||||
#if DMDV2
|
||||
{
|
||||
std::vector<LLConstant*> keysInits, valuesInits;
|
||||
for (size_t i = 0, n = keys->dim; i < n; ++i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue