public final HashMap<File, EntryConstruct> entryMap;
public final HashSet<String> headerFiles;
+
+ // In the generated header file, we need to forward the user-defined
+ public final HashSet<String> forwardClass;
private GlobalConstruct globalConstruct;
OPLabelSet = new HashSet<String>();
entryMap = new HashMap<File, EntryConstruct>();
headerFiles = new HashSet<String>();
+ forwardClass = new HashSet<String>();
globalConstruct = null;
}
line = lineReader.readLine();
lineNum = lineReader.getLineNumber();
construct.processFunctionDeclaration(line);
+
+ // Record those user-defined struct
+ // RET
+ String returnType = construct.getFunctionHeader().returnType;
+ if (SpecUtils.isUserDefinedStruct(returnType))
+ forwardClass.add(SpecUtils.getPlainType(returnType));
+ // Arguments
+ for (VariableDeclaration decl : construct.getFunctionHeader().args) {
+ if (SpecUtils.isUserDefinedStruct(decl.type))
+ forwardClass.add(SpecUtils.getPlainType(decl.type));
+ }
+
} catch (IOException e) {
errMsg = "Spec error in file \""
+ file.getName()