mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-03 02:53:13 +01:00
Removed LLVM 3.0 compatibility code.
There might be still some pieces left here and there, and there is certainly code that could be rewritten in a nicer way with the 3.0 requirement out of the picture.
This commit is contained in:
@@ -31,9 +31,7 @@
|
||||
#include "ir/irmodule.h"
|
||||
#include "llvm/MC/MCAsmInfo.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#if LDC_LLVM_VER >= 301
|
||||
#include "llvm/Transforms/Utils/ModuleUtils.h"
|
||||
#endif
|
||||
#include <stack>
|
||||
|
||||
/****************************************************************************************/
|
||||
@@ -1446,13 +1444,7 @@ LLConstant* DtoConstExpInit(Loc loc, Type* type, Expression* exp)
|
||||
assert(tv->basetype->ty == Tsarray);
|
||||
dinteger_t elemCount =
|
||||
static_cast<TypeSArray *>(tv->basetype)->dim->toInteger();
|
||||
|
||||
#if LDC_LLVM_VER == 300
|
||||
std::vector<LLConstant*> Elts(elemCount, val);
|
||||
return llvm::ConstantVector::get(Elts);
|
||||
#else
|
||||
return llvm::ConstantVector::getSplat(elemCount, val);
|
||||
#endif
|
||||
}
|
||||
|
||||
error(loc, "LDC internal error: cannot yet convert default initializer %s of type %s to %s",
|
||||
|
||||
Reference in New Issue
Block a user