Rolling back earlier patch, the header should come after the declarations, now that records are not in the headers

This commit is contained in:
Neil Brown 2009-04-02 16:51:11 +00:00
parent 5024e0d615
commit 4ea3357129

View File

@ -163,8 +163,6 @@ cgenTopLevel :: String -> A.AST -> CGen ()
cgenTopLevel headerName s
= do tell ["#define occam_INT_size ", show cIntSize,"\n"]
tell ["#include <tock_support_cif.h>\n"]
tell ["#include \"", dropPath headerName, "\"\n"]
cs <- getCompState
let isTopLevelSpec (A.Specification _ n _)
@ -177,6 +175,8 @@ cgenTopLevel headerName s
sequence_ $ map (call genForwardDeclaration)
(listify (not . isTopLevelSpec) s)
tell ["#include \"", dropPath headerName, "\"\n"]
sequence_ [tell ["#include \"", usedFile, ".tock.h\"\n"]
| usedFile <- Set.toList $ csUsedFiles cs]