scanf bon

This commit is contained in:
Vu Tuan Minh
2025-04-30 09:59:44 +02:00
parent 20f6170168
commit d4a9b1f71d
8 changed files with 17 additions and 3 deletions

View File

@@ -220,7 +220,12 @@ public class toLLVM_Visitor implements ProgramVisitor<SymTable,ProgramLLVMImp>,
for(int i = 0; i<instr.t().size(); i++){
String nomVar = h.getVar(instr.t().get(i).name());
Type typeVar = h.getType(instr.t().get(i).name());
VarLLVMImp newVar = new VarLLVMImp(typeVar.accept(this,h), nomVar,false);
//Ajout * par passant PointerType
TypeLLVM baseType = typeVar.accept(this, h);
TypeLLVM ptrType = new PointerLLVMImp(baseType);
VarLLVMImp newVar = new VarLLVMImp(ptrType, nomVar,false);
strGlobal+="%d"; //2 char de long
size+=2;
params.add(newVar);