X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FCLabel.hs;h=f9a94b79b13c0f857477ec435ddb22476a01b65d;hb=4f92da533cd1c7b5f41ef8794ee6a284f1680413;hp=a3c2634e35a3ac594cc03dd19c05e08e91b0a203;hpb=c245355e6f2c7b7c95e9af910c4d420e13af9413;p=ghc-hetmet.git diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs index a3c2634..f9a94b7 100644 --- a/compiler/cmm/CLabel.hs +++ b/compiler/cmm/CLabel.hs @@ -446,6 +446,8 @@ entryLblToInfoLbl l = pprPanic "CLabel.entryLblToInfoLbl" (pprCLabel l) -- ----------------------------------------------------------------------------- -- Does a CLabel need declaring before use or not? +-- +-- See wiki:Commentary/Compiler/Backends/PprC#Prototypes needsCDecl :: CLabel -> Bool -- False <=> it's pre-declared; don't bother @@ -463,10 +465,6 @@ needsCDecl ModuleRegdLabel = False needsCDecl (StringLitLabel _) = False needsCDecl (AsmTempLabel _) = False needsCDecl (RtsLabel _) = False - -- RTS labels are declared in RTS header files. Otherwise we'd need - -- to give types for each label reference in the RTS .cmm files - -- somehow; when generating .cmm code we know the types of labels (info, - -- entry etc.) but for hand-written .cmm code we don't. needsCDecl l@(ForeignLabel _ _ _) = not (isMathFun l) needsCDecl (CC_Label _) = True needsCDecl (CCS_Label _) = True