modernc.org/cc@v1.0.1/v2/enum.go (about)

     1  // Copyright 2017 The CC Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package cc // import "modernc.org/cc/v2"
     6  
     7  import (
     8  	"modernc.org/ir"
     9  )
    10  
    11  // [0]: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
    12  
    13  type cond int
    14  
    15  const (
    16  	condZero cond = iota
    17  
    18  	condIfOff
    19  	condIfOn
    20  	condIfSkip
    21  
    22  	maxCond
    23  )
    24  
    25  var (
    26  	condOn = [maxCond]bool{
    27  		condIfOn: true,
    28  		condZero: true,
    29  	}
    30  )
    31  
    32  // Linkage describes linkage of identifiers, [0]6.2.2.
    33  type Linkage int
    34  
    35  // Values of Linkage
    36  const (
    37  	LinkageNone     Linkage = iota
    38  	LinkageInternal Linkage = Linkage(ir.InternalLinkage)
    39  	LinkageExternal Linkage = Linkage(ir.ExternalLinkage)
    40  )
    41  
    42  // StorageDuration describes lifetime of an object, [0]6.2.4.
    43  type StorageDuration int
    44  
    45  // Values of StorageDuration
    46  const (
    47  	StorageDurationAutomatic StorageDuration = iota
    48  	StorageDurationStatic
    49  )