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

Function CreateEntryBlockAlloca

NULLC/SyntaxTreeLLVM.cpp:555–559  ·  view source on GitHub ↗

CreateEntryBlockAlloca - Create an alloca instruction in the entry block of the function. This is used for mutable variables etc.

Source from the content-addressed store, hash-verified

553
554// CreateEntryBlockAlloca - Create an alloca instruction in the entry block of the function. This is used for mutable variables etc.
555AllocaInst* CreateEntryBlockAlloca(Function *TheFunction, const std::string &VarName, const llvm::Type* type)
556{
557 IRBuilder<> TmpB(&TheFunction->getEntryBlock(), TheFunction->getEntryBlock().begin());
558 return TmpB.CreateAlloca(type, 0, VarName.c_str());
559}
560
561void NodeExpressionList::CompileLLVM()
562{

Callers 2

CompileLLVMMethod · 0.85
GenerateCompareToZeroFunction · 0.85

Calls 2

c_strMethod · 0.80
beginMethod · 0.45

Tested by

no test coverage detected