comparison 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
comparison
equal deleted inserted replaced
132:1700239cab2e 133:44a95ac7368a
37 llvm::Value* DtoGEPi(llvm::Value* ptr, unsigned i0, unsigned i1, const std::string& var, llvm::BasicBlock* bb=NULL); 37 llvm::Value* DtoGEPi(llvm::Value* ptr, unsigned i0, unsigned i1, const std::string& var, llvm::BasicBlock* bb=NULL);
38 38
39 llvm::Value* DtoRealloc(llvm::Value* ptr, const llvm::Type* ty); 39 llvm::Value* DtoRealloc(llvm::Value* ptr, const llvm::Type* ty);
40 llvm::Value* DtoRealloc(llvm::Value* ptr, llvm::Value* len); 40 llvm::Value* DtoRealloc(llvm::Value* ptr, llvm::Value* len);
41 41
42 void DtoAssert(llvm::Value* cond, Loc* loc, DValue* msg); 42 void DtoAssert(Loc* loc, DValue* msg);
43 43
44 llvm::Value* DtoNestedContext(FuncDeclaration* func); 44 llvm::Value* DtoNestedContext(FuncDeclaration* func);
45 llvm::Value* DtoNestedVariable(VarDeclaration* vd); 45 llvm::Value* DtoNestedVariable(VarDeclaration* vd);
46 46
47 void DtoAnnotation(const char* str); 47 void DtoAnnotation(const char* str);
79 void DtoMemSetZero(llvm::Value* dst, llvm::Value* nbytes); 79 void DtoMemSetZero(llvm::Value* dst, llvm::Value* nbytes);
80 void DtoMemCpy(llvm::Value* dst, llvm::Value* src, llvm::Value* nbytes); 80 void DtoMemCpy(llvm::Value* dst, llvm::Value* src, llvm::Value* nbytes);
81 bool DtoCanLoad(llvm::Value* ptr); 81 bool DtoCanLoad(llvm::Value* ptr);
82 llvm::Value* DtoLoad(llvm::Value* src); 82 llvm::Value* DtoLoad(llvm::Value* src);
83 void DtoStore(llvm::Value* src, llvm::Value* dst); 83 void DtoStore(llvm::Value* src, llvm::Value* dst);
84 llvm::Value* DtoBitCast(llvm::Value* v, const llvm::Type* t); 84 llvm::Value* DtoBitCast(llvm::Value* v, const llvm::Type* t, const char* name=0);
85 85
86 // llvm::dyn_cast wrappers 86 // llvm::dyn_cast wrappers
87 const llvm::PointerType* isaPointer(llvm::Value* v); 87 const llvm::PointerType* isaPointer(llvm::Value* v);
88 const llvm::PointerType* isaPointer(const llvm::Type* t); 88 const llvm::PointerType* isaPointer(const llvm::Type* t);
89 const llvm::ArrayType* isaArray(llvm::Value* v); 89 const llvm::ArrayType* isaArray(llvm::Value* v);
92 const llvm::StructType* isaStruct(const llvm::Type* t); 92 const llvm::StructType* isaStruct(const llvm::Type* t);
93 llvm::Constant* isaConstant(llvm::Value* v); 93 llvm::Constant* isaConstant(llvm::Value* v);
94 llvm::ConstantInt* isaConstantInt(llvm::Value* v); 94 llvm::ConstantInt* isaConstantInt(llvm::Value* v);
95 llvm::Argument* isaArgument(llvm::Value* v); 95 llvm::Argument* isaArgument(llvm::Value* v);
96 llvm::GlobalVariable* isaGlobalVar(llvm::Value* v); 96 llvm::GlobalVariable* isaGlobalVar(llvm::Value* v);
97
98 // llvm::T::get(...) wrappers
99 const llvm::PointerType* getPtrToType(const llvm::Type* t);
100 llvm::ConstantPointerNull* getNullPtr(const llvm::Type* t);
101
102 // type sizes
103 size_t getTypeBitSize(const llvm::Type* t);
104 size_t getTypeStoreSize(const llvm::Type* t);
105 size_t getABITypeSize(const llvm::Type* t);
97 106
98 // basic operations 107 // basic operations
99 void DtoAssign(DValue* lhs, DValue* rhs); 108 void DtoAssign(DValue* lhs, DValue* rhs);
100 109
101 // casts 110 // casts