ghc-8.2.0.20170404: The GHC API

Safe HaskellNone
LanguageHaskell2010

CLabel (signature[?])

Contents

Synopsis

Documentation

data ForeignLabelSource Source #

Record where a foreign label is stored.

Constructors

ForeignLabelInPackage UnitId

Label is in a named package

ForeignLabelInExternalPackage

Label is in some external, system package that doesn't also contain compiled Haskell code, and is not associated with any .hi files. We don't have to worry about Haskell code being inlined from external packages. It is safe to treat the RTS package as "external".

ForeignLabelInThisPackage

Label is in the package currenly being compiled. This is only used for creating hacky tmp labels during code generation. Don't use it in any code that might be inlined across a package boundary (ie, core code) else the information will be wrong relative to the destination module.

pprDebugCLabel :: CLabel -> SDoc Source #

For debugging problems with the CLabel representation. We can't make a Show instance for CLabel because lots of its components don't have instances. The regular Outputable instance only shows the label name, and not its other info.

mkAsmTempDieLabel :: CLabel -> CLabel Source #

Construct a label for a DWARF Debug Information Entity (DIE) describing another symbol.

addLabelSize :: CLabel -> Int -> CLabel Source #

Update the label size field in a ForeignLabel

foreignLabelStdcallInfo :: CLabel -> Maybe Int Source #

Get the label size field from a ForeignLabel

isBytesLabel :: CLabel -> Bool Source #

Whether label is a top-level string literal

isForeignLabel :: CLabel -> Bool Source #

Whether label is a non-haskell label (defined in C code)

maybeAsmTemp :: CLabel -> Maybe Unique Source #

If a label is a local temporary used for native code generation then return just its unique, otherwise nothing.

externallyVisibleCLabel :: CLabel -> Bool Source #

Is a CLabel visible outside this object file or not? From the point of view of the code generator, a name is externally visible if it has to be declared as exported in the .o file's symbol table; that is, made non-static.

isMathFun :: CLabel -> Bool Source #

Check whether a label corresponds to a C function that has a prototype in a system header somehere, or is built-in to the C compiler. For these labels we avoid generating our own C prototypes.

Conversions