<commit_before>module Data.LLVM.Types.Attributes (
  -- * Types
  ArithFlags(..),
  defaultArithFlags,
  CmpPredicate(..),
  CallingConvention(..),
  defaultCallingConvention,
  LinkageType(..),
  defaultLinkage,
  VisibilityStyle(..),
  defaultVisibility,
  ParamAttribute(..),
  FunctionAttribute(..),
  TargetTriple(..),
  Assembly(..),
  AtomicOperation(..),
  LandingPadClause(..),
  AtomicOrdering(..),
  defaultAtomicOrdering,
  SynchronizationScope(..),
  defaultSynchronizationScope
  ) where

#include "c++/llvm-base-enums.h"

import Control.DeepSeq
import Data.Text ( Text, unpack )

{#enum LinkageType {} deriving (Eq) #}
instance Show LinkageType where
  show LTExternal = ""
  show LTAvailableExternally = "available_externally"
  show LTLinkOnceAny = "linkonce"
  show LTLinkOnceODR = "linkonce_odr"
  show LTWeakAny = "weak"
  show LTWeakODR = "weak_odr"
  show LTAppending = "appending"
  show LTInternal = "internal"
  show LTPrivate = "private"
  show LTLinkerPrivate = "linker_private"
  show LTLinkerPrivateWeak = "linker_private_weak"
  show LTLinkerPrivateWeakDefAuto = "linker_private_weak_def_auto"
  show LTDLLImport = "dllimport"
  show LTDLLExport = "dllexport"
  show LTExternalWeak = "extern_weak"
  show LTCommon = "common"

instance NFData LinkageType
defaultLinkage :: LinkageType
defaultLinkage = LTExternal

{#enum VisibilityStyle {} deriving (Eq) #}<commit_msg>Add a note about a linkage type removed in LLVM 3.2<commit_after>module Data.LLVM.Types.Attributes (
  -- * Types
  ArithFlags(..),
  defaultArithFlags,
  CmpPredicate(..),
  CallingConvention(..),
  defaultCallingConvention,
  LinkageType(..),
  defaultLinkage,
  VisibilityStyle(..),
  defaultVisibility,
  ParamAttribute(..),
  FunctionAttribute(..),
  TargetTriple(..),
  Assembly(..),
  AtomicOperation(..),
  LandingPadClause(..),
  AtomicOrdering(..),
  defaultAtomicOrdering,
  SynchronizationScope(..),
  defaultSynchronizationScope
  ) where

#include "c++/llvm-base-enums.h"

import Control.DeepSeq
import Data.Text ( Text, unpack )

-- | Types of symbol linkage.  Note that LTLinkerPrivateWeakDefAuto is
-- only available in llvm < 3.2.
{#enum LinkageType {} deriving (Eq) #}
instance Show LinkageType where
  show LTExternal = ""
  show LTAvailableExternally = "available_externally"
  show LTLinkOnceAny = "linkonce"
  show LTLinkOnceODR = "linkonce_odr"
  show LTWeakAny = "weak"
  show LTWeakODR = "weak_odr"
  show LTAppending = "appending"
  show LTInternal = "internal"
  show LTPrivate = "private"
  show LTLinkerPrivate = "linker_private"
  show LTLinkerPrivateWeak = "linker_private_weak"
  show LTLinkerPrivateWeakDefAuto = "linker_private_weak_def_auto"
  show LTDLLImport = "dllimport"
  show LTDLLExport = "dllexport"
  show LTExternalWeak = "extern_weak"
  show LTCommon = "common"

instance NFData LinkageType
defaultLinkage :: LinkageType
defaultLinkage = LTExternal

{#enum VisibilityStyle {} deriving (Eq) #}
{'fraction_non_alphanumeric': 0.11376021798365123, 'fraction_numerical': 0.0013623978201634877, 'mean_word_length': 4.658959537572255, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2472371', 'n_tokens_mistral': 1046, 'n_tokens_neox': 989, 'n_words': 217}