MCPcopy Create free account
hub / github.com/WheretIB/nullc / PromoteToStackType

Function PromoteToStackType

NULLC/SyntaxTreeLLVM.cpp:389–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

387}
388
389Value* PromoteToStackType(Value *V, TypeInfo *type)
390{
391 asmDataType fDT = type->dataType;
392 switch(fDT)
393 {
394 case DTYPE_CHAR:
395 case DTYPE_SHORT:
396 V = Builder.CreateIntCast(V, Type::getInt32Ty(getGlobalContext()), true, "tmp_toint");
397 break;
398 case DTYPE_FLOAT:
399 V = Builder.CreateFPCast(V, Type::getDoubleTy(getGlobalContext()), "tmp_ftod");
400 break;
401 }
402 return V;
403}
404
405Value* ConvertFirstToSecond(Value *V, TypeInfo *firstType, TypeInfo *secondType)
406{

Callers 2

CompileLLVMMethod · 0.85
GenerateCompareToZeroFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected