File tree 1 file changed +2
-8
lines changed
1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -9316,17 +9316,11 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor<ASRToLLVMVisitor>
9316
9316
llvm::Function *fn = module->getFunction("_lpython_get_argc");
9317
9317
if(!fn) {
9318
9318
llvm::FunctionType *function_type = llvm::FunctionType::get(
9319
- llvm::Type::getVoidTy(context), {
9320
- llvm::Type::getInt32Ty(context)->getPointerTo()
9321
- }, false);
9319
+ llvm::Type::getInt32Ty(context), {}, false);
9322
9320
fn = llvm::Function::Create(function_type,
9323
9321
llvm::Function::ExternalLinkage, "_lpython_get_argc", *module);
9324
9322
}
9325
- llvm::AllocaInst *result = builder->CreateAlloca(
9326
- llvm::Type::getInt32Ty(context), nullptr);
9327
- std::vector<llvm::Value*> args = {result};
9328
- builder->CreateCall(fn, args);
9329
- tmp = CreateLoad(result);
9323
+ tmp = builder->CreateCall(fn, {});
9330
9324
return;
9331
9325
} else if (func_name == "achar") {
9332
9326
// TODO: make achar just StringChr
You can’t perform that action at this time.
0 commit comments