Mercurial > projects > ldc
diff gen/tollvm.h @ 133:44a95ac7368a trunk
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
In particular, assertions has been fixed to include file/line info, and much more!
author | lindquist |
---|---|
date | Mon, 14 Jan 2008 05:11:54 +0100 |
parents | 5825d48b27d1 |
children | 0e28624814e8 |
line wrap: on
line diff
--- a/gen/tollvm.h Fri Jan 11 17:57:40 2008 +0100 +++ b/gen/tollvm.h Mon Jan 14 05:11:54 2008 +0100 @@ -39,7 +39,7 @@ llvm::Value* DtoRealloc(llvm::Value* ptr, const llvm::Type* ty); llvm::Value* DtoRealloc(llvm::Value* ptr, llvm::Value* len); -void DtoAssert(llvm::Value* cond, Loc* loc, DValue* msg); +void DtoAssert(Loc* loc, DValue* msg); llvm::Value* DtoNestedContext(FuncDeclaration* func); llvm::Value* DtoNestedVariable(VarDeclaration* vd); @@ -81,7 +81,7 @@ bool DtoCanLoad(llvm::Value* ptr); llvm::Value* DtoLoad(llvm::Value* src); void DtoStore(llvm::Value* src, llvm::Value* dst); -llvm::Value* DtoBitCast(llvm::Value* v, const llvm::Type* t); +llvm::Value* DtoBitCast(llvm::Value* v, const llvm::Type* t, const char* name=0); // llvm::dyn_cast wrappers const llvm::PointerType* isaPointer(llvm::Value* v); @@ -95,6 +95,15 @@ llvm::Argument* isaArgument(llvm::Value* v); llvm::GlobalVariable* isaGlobalVar(llvm::Value* v); +// llvm::T::get(...) wrappers +const llvm::PointerType* getPtrToType(const llvm::Type* t); +llvm::ConstantPointerNull* getNullPtr(const llvm::Type* t); + +// type sizes +size_t getTypeBitSize(const llvm::Type* t); +size_t getTypeStoreSize(const llvm::Type* t); +size_t getABITypeSize(const llvm::Type* t); + // basic operations void DtoAssign(DValue* lhs, DValue* rhs);