Made sure that the names printed in TOCKEXTERNAL pragmas are fully munged (and thus equivalent to the exact C function name)
This commit is contained in:
parent
d6ad0ba202
commit
9bf32e339d
|
@ -34,6 +34,7 @@ module GenerateC
|
|||
, genName
|
||||
, genRightB
|
||||
, genStatic
|
||||
, nameString
|
||||
, needStackSizes
|
||||
, justOnly
|
||||
, withIf
|
||||
|
|
|
@ -30,6 +30,7 @@ import qualified AST as A
|
|||
import CompState
|
||||
import EvalConstants
|
||||
import EvalLiterals
|
||||
import GenerateC -- For nameString
|
||||
import Metadata
|
||||
import OccamTypes
|
||||
import Pass
|
||||
|
@ -73,7 +74,7 @@ writeIncFile = occamOnlyPass "Write .inc file" [] []
|
|||
thisProc <- sequence (
|
||||
[return $ "#PRAGMA TOCKEXTERNAL \"PROC " ++ origN ++ "("
|
||||
] ++ intersperse (return ",") (map showCode fs) ++
|
||||
[return $ ") = " ++ A.nameName n ++ "\""
|
||||
[return $ ") = " ++ nameString n ++ "\""
|
||||
]) >>* concat
|
||||
modify $ \cs -> cs { csOriginalTopLevelProcs =
|
||||
A.nameName n : csOriginalTopLevelProcs cs }
|
||||
|
@ -85,7 +86,7 @@ writeIncFile = occamOnlyPass "Write .inc file" [] []
|
|||
] ++ intersperse (return ",") (map showCode ts) ++
|
||||
[return $ " FUNCTION " ++ origN ++ "("
|
||||
] ++ intersperse (return ",") (map showCode fs) ++
|
||||
[return $ ") = " ++ A.nameName n ++ "\""
|
||||
[return $ ") = " ++ nameString n ++ "\""
|
||||
]) >>* concat
|
||||
modify $ \cs -> cs { csOriginalTopLevelProcs =
|
||||
A.nameName n : csOriginalTopLevelProcs cs }
|
||||
|
|
Loading…
Reference in New Issue
Block a user