comparison gen/tollvm.h @ 344:e20ce6d8d374 trunk

[svn r365] Implemented raw struct equality comparison, uses C memcmp. Renamed DtoDelegateCompare to DtoDelegateEquals, for consistency with the other equality helpers.
author lindquist
date Sun, 13 Jul 2008 04:11:08 +0200
parents 7086a84ab3d6
children 8014dbd24605
comparison
equal deleted inserted replaced
343:15eb8f5f2441 344:e20ce6d8d374
25 // TODO should probably be removed in favor of DMD's Type::toBasetype 25 // TODO should probably be removed in favor of DMD's Type::toBasetype
26 Type* DtoDType(Type* t); 26 Type* DtoDType(Type* t);
27 27
28 // delegate helpers 28 // delegate helpers
29 const LLStructType* DtoDelegateType(Type* t); 29 const LLStructType* DtoDelegateType(Type* t);
30 LLValue* DtoDelegateCompare(TOK op, LLValue* lhs, LLValue* rhs); 30 LLValue* DtoDelegateEquals(TOK op, LLValue* lhs, LLValue* rhs);
31 31
32 // return linkage type for symbol using the current ir state for context 32 // return linkage type for symbol using the current ir state for context
33 LLGlobalValue::LinkageTypes DtoLinkage(Dsymbol* sym); 33 LLGlobalValue::LinkageTypes DtoLinkage(Dsymbol* sym);
34 LLGlobalValue::LinkageTypes DtoInternalLinkage(Dsymbol* sym); 34 LLGlobalValue::LinkageTypes DtoInternalLinkage(Dsymbol* sym);
35 LLGlobalValue::LinkageTypes DtoExternalLinkage(Dsymbol* sym); 35 LLGlobalValue::LinkageTypes DtoExternalLinkage(Dsymbol* sym);
112 * @param nbytes Number of bytes to copy. 112 * @param nbytes Number of bytes to copy.
113 */ 113 */
114 void DtoMemCpy(LLValue* dst, LLValue* src, LLValue* nbytes); 114 void DtoMemCpy(LLValue* dst, LLValue* src, LLValue* nbytes);
115 115
116 /** 116 /**
117 * Generates a call to C memcmp.
118 */
119 LLValue* DtoMemCmp(LLValue* lhs, LLValue* rhs, LLValue* nbytes);
120
121 /**
117 * The same as DtoMemSetZero but figures out the size itself by "dereferencing" the v pointer once. 122 * The same as DtoMemSetZero but figures out the size itself by "dereferencing" the v pointer once.
118 * @param v Destination memory. 123 * @param v Destination memory.
119 */ 124 */
120 void DtoAggrZeroInit(LLValue* v); 125 void DtoAggrZeroInit(LLValue* v);
121 126