Commit 79c7cd6c authored by Alexandru Dura's avatar Alexandru Dura
Browse files

Print source location for class fields

parent 1b1bca9a
......@@ -473,6 +473,11 @@ aspect IRGen {
ctx.endBB();
}
syn IRVar VarDecl.genIR() = new IRVar(getIdDecl().genIR(), variableType().genIRTypeRef());
syn IRVar VarDecl.genIR() {
IRVar var = new IRVar(getIdDecl().genIR(), variableType().genIRTypeRef());
var.setSourceLocation(sourceLocation());
return var;
}
syn IRName IdDecl.genIR() = new IRName(getIdentifier());
}
......@@ -105,6 +105,10 @@ aspect IRPrint {
getIRName().print(out);
out.print(" : ");
getIRTypeRef().print(out);
if (IRProgram.printSourceLocations) {
out.print("\t");
getSourceLocation().print(out);
}
}
public void IRCodeBB.print(PrintStream out) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment