module Llvm.Types where
#include "HsVersions.h"
-#include "ghcconfig.h"
import Data.Char
import Numeric
show (LMAlias (s,_)) = "%" ++ unpackFS s
--- | An LLVM section defenition. If Nothing then let LLVM decide the section
+-- | An LLVM section definition. If Nothing then let LLVM decide the section
type LMSection = Maybe LMString
type LMAlign = Maybe Int
type LMConst = Bool -- ^ is a variable constant or not
-- in a plain textual representation (e.g. @x@, @y@ or @42@).
getPlainName :: LlvmVar -> String
getPlainName (LMGlobalVar x _ _ _ _ _) = unpackFS x
-getPlainName (LMLocalVar x _ ) = show x
+getPlainName (LMLocalVar x LMLabel ) = show x
+getPlainName (LMLocalVar x _ ) = "l" ++ show x
getPlainName (LMNLocalVar x _ ) = unpackFS x
getPlainName (LMLitVar x ) = getLit x