class AdLint::Ld::TypedefMap

Attributes

composing_fpaths[R]

Public Class Methods

new() click to toggle source
# File lib/adlint/ld/typedef.rb, line 61
def initialize
  @name_index = Hash.new { |hash, key| hash[key] = Set.new }
  @composing_fpaths = Set.new
end

Public Instance Methods

add(typedef) click to toggle source
# File lib/adlint/ld/typedef.rb, line 68
def add(typedef)
  @name_index[typedef.name].add(typedef)
  @composing_fpaths.add(typedef.location.fpath)
end
all_typedefs() click to toggle source
# File lib/adlint/ld/typedef.rb, line 73
def all_typedefs
  @name_index.values.each_with_object([]) do |typedefs, all|
    all.concat(typedefs.to_a)
  end
end
lookup(typedef_name) click to toggle source
# File lib/adlint/ld/typedef.rb, line 79
def lookup(typedef_name)
  @name_index[typedef_name].to_a
end