Closed vivekg13186 closed 5 years ago
sorry figure it out need to add basic block to function first let bb1 = llvm.BasicBlock.create(context,"start"); fun_g.addBasicBlock(bb1); let irb1 = new llvm.IRBuilder(bb1); let d = irb1.createAlloca(llvm.Type.getDoubleTy(context),undefined,"d");
let bb1 = llvm.BasicBlock.create(context,"start"); let irb1 = new llvm.IRBuilder(bb1); let d = irb1.createAlloca(llvm.Type.getDoubleTy(context),undefined,"d");
third line throws Segmentation fault: 11 error