Rolling back earlier patch, the header should come after the declarations, now that records are not in the headers
This commit is contained in:
parent
5024e0d615
commit
4ea3357129
|
@ -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]
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user