comparison gen/toir.cpp @ 460:3a5d6ff8c70f

Automated merge with http://hg.dsource.org/projects/llvmdc
author Christian Kamm <kamm incasoftware de>
date Sat, 02 Aug 2008 22:54:46 +0200
parents 121624c14053 9db9099583ca
children e381e082d5cb
comparison
equal deleted inserted replaced
458:121624c14053 460:3a5d6ff8c70f
843 Logger::println("is immediate"); 843 Logger::println("is immediate");
844 return v; 844 return v;
845 } 845 }
846 Logger::println("is nothing special"); 846 Logger::println("is nothing special");
847 return new DFieldValue(type, v->getLVal(), false); 847 return new DFieldValue(type, v->getLVal(), false);
848 }
849
850 LLConstant* AddrExp::toConstElem(IRState* p)
851 {
852 assert(e1->op == TOKvar);
853 VarExp* vexp = (VarExp*)e1;
854 VarDeclaration* vd = vexp->var->isVarDeclaration();
855 assert(vd);
856 LLConstant* llc = llvm::dyn_cast<LLConstant>(vd->ir.getIrValue());
857 assert(llc);
858 return llc;
848 } 859 }
849 860
850 ////////////////////////////////////////////////////////////////////////////////////////// 861 //////////////////////////////////////////////////////////////////////////////////////////
851 862
852 DValue* PtrExp::toElem(IRState* p) 863 DValue* PtrExp::toElem(IRState* p)