[svn r361] Removed some dead code.

This commit is contained in:
Tomas Lindquist Olsen
2008-07-13 02:04:25 +02:00
parent 85c1b42b1b
commit d1e41f611e
3 changed files with 6 additions and 123 deletions

View File

@@ -106,21 +106,6 @@ void DtoArrayAssign(LLValue* dst, LLValue* src)
//////////////////////////////////////////////////////////////////////////////////////////
typedef const LLType* constLLVMTypeP;
static size_t checkRectArrayInit(const LLType* pt, const LLType* t)
{
const LLArrayType* arrty = isaArray(pt);
if (pt != t && arrty) {
size_t n = checkRectArrayInit(arrty->getElementType(), t);
size_t ne = arrty->getNumElements();
if (n) return n * ne;
return ne;
}
return 0;
}
void DtoArrayInit(DValue* array, DValue* value)
{
Logger::println("DtoArrayInit");

View File

@@ -31,35 +31,6 @@ bool LLVM_D_InitRuntime()
LLVM_D_BuildRuntimeModule();
return true;
/*
if (!global.params.runtimeImppath) {
error("You must set the runtime import path with -E");
fatal();
}
std::string filename(global.params.runtimeImppath);
filename.append("/llvmdcore.bc");
llvm::MemoryBuffer* buffer = llvm::MemoryBuffer::getFile(filename.c_str(), filename.length());
if (!buffer) {
Logger::println("Failed to load runtime library from disk");
runtime_failed = true;
return false;
}
std::string errstr;
bool retval = false;
M = llvm::ParseBitcodeFile(buffer, &errstr);
if (M) {
retval = true;
}
else {
Logger::println("Failed to load runtime: %s", errstr.c_str());
runtime_failed = true;
}
delete buffer;
return retval;
*/
}
void LLVM_D_FreeRuntime()

View File

@@ -2702,91 +2702,17 @@ DValue* AssocArrayLiteralExp::toElem(IRState* p)
//////////////////////////////////////////////////////////////////////////////////////////
#define STUB(x) DValue *x::toElem(IRState * p) {error("Exp type "#x" not implemented: %s", toChars()); fatal(); return 0; }
//STUB(IdentityExp);
//STUB(CondExp);
//STUB(EqualExp);
//STUB(InExp);
//STUB(CmpExp);
//STUB(AndAndExp);
//STUB(OrOrExp);
//STUB(AndExp);
//STUB(AndAssignExp);
//STUB(OrExp);
//STUB(OrAssignExp);
//STUB(XorExp);
//STUB(XorAssignExp);
//STUB(ShrExp);
//STUB(ShrAssignExp);
//STUB(ShlExp);
//STUB(ShlAssignExp);
//STUB(UshrExp);
//STUB(UshrAssignExp);
//STUB(DivExp);
//STUB(DivAssignExp);
//STUB(MulExp);
//STUB(MulAssignExp);
//STUB(ModExp);
//STUB(ModAssignExp);
//STUB(CatExp);
//STUB(CatAssignExp);
//STUB(AddExp);
//STUB(AddAssignExp);
STUB(Expression);
//STUB(MinExp);
//STUB(MinAssignExp);
//STUB(PostExp);
//STUB(NullExp);
//STUB(ThisExp);
//STUB(CallExp);
STUB(DotTypeExp);
STUB(TypeDotIdExp);
//STUB(DotVarExp);
//STUB(AssertExp);
//STUB(FuncExp);
//STUB(DelegateExp);
//STUB(VarExp);
//STUB(DeclarationExp);
//STUB(NewExp);
//STUB(SymOffExp);
STUB(ScopeExp);
//STUB(AssignExp);
STUB(TypeExp);
//STUB(RealExp);
//STUB(ComplexExp);
//STUB(StringExp);
//STUB(IntegerExp);
STUB(BoolExp);
//STUB(NotExp);
//STUB(ComExp);
//STUB(NegExp);
//STUB(PtrExp);
//STUB(AddrExp);
//STUB(SliceExp);
//STUB(CastExp);
//STUB(DeleteExp);
//STUB(IndexExp);
//STUB(CommaExp);
//STUB(ArrayLengthExp);
//STUB(HaltExp);
//STUB(RemoveExp);
//STUB(ArrayLiteralExp);
//STUB(AssocArrayLiteralExp);
//STUB(StructLiteralExp);
STUB(TupleExp);
#define CONSTSTUB(x) LLConstant* x::toConstElem(IRState * p) {error("const Exp type "#x" not implemented: '%s' type: '%s'", toChars(), type->toChars()); fatal(); return NULL; }
CONSTSTUB(Expression);
//CONSTSTUB(IntegerExp);
//CONSTSTUB(RealExp);
//CONSTSTUB(NullExp);
//CONSTSTUB(ComplexExp);
//CONSTSTUB(StringExp);
//CONSTSTUB(VarExp);
//CONSTSTUB(ArrayLiteralExp);
CONSTSTUB(AssocArrayLiteralExp);
//CONSTSTUB(StructLiteralExp);
unsigned Type::totym() { return 0; }
@@ -2947,17 +2873,18 @@ int TypedefDeclaration::cvMember(unsigned char*)
return 0;
}
void obj_includelib(char*){}
void obj_includelib(char*)
{
// FIXME: we want to support pragma(lib)
}
void
backend_init()
void backend_init()
{
// now lazily loaded
//LLVM_D_InitRuntime();
}
void
backend_term()
void backend_term()
{
LLVM_D_FreeRuntime();
}