correction bug dans Declaration
This commit is contained in:
@@ -75,7 +75,12 @@ public class Main {
|
||||
String llvmStr = astLLVM.prettyprinter();
|
||||
out2.println(llvmStr);
|
||||
|
||||
|
||||
/*
|
||||
utiliser la commande :
|
||||
java -jar build/libs/TP2.jar file.vsl > file.ll
|
||||
provoque peut provoquer de mauvais encodage (UTF16(LE) au lieu d'UTF8)
|
||||
et empêche l'utilisation de print pour autre chose
|
||||
*/
|
||||
String sortieLLVM = args[0].replace(".vsl", ".ll");
|
||||
Files.write(
|
||||
Paths.get(sortieLLVM),
|
||||
|
||||
@@ -117,7 +117,7 @@ public class toLLVM_Visitor implements ProgramVisitor<SymTable,ProgramLLVMImp>,
|
||||
r = h.addVar(nom, arrayType);
|
||||
}
|
||||
h = r.symTable;
|
||||
list.add(new AssignLLVMImp(new VarLLVMImp(t2, nom,false),new allocaLLVMImp(t2)));
|
||||
list.add(new AssignLLVMImp(new VarLLVMImp(t2, r.var,false),new allocaLLVMImp(t2)));
|
||||
}
|
||||
return new InstrAndSymTable(list,h);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user