mirror of
https://github.com/mikpe/pdp10-tools.git
synced 2026-05-03 06:29:10 +00:00
as: tunit: fix dialyzer error
This commit is contained in:
@@ -642,8 +642,8 @@ expr_fixup(Tunit, Expr) ->
|
|||||||
|
|
||||||
tunit_init() ->
|
tunit_init() ->
|
||||||
SectionText = section_dot_text(),
|
SectionText = section_dot_text(),
|
||||||
Tunit = tunit:put_section(tunit:new(), SectionText),
|
Cursect = SectionText#section.name,
|
||||||
Tunit#tunit{cursect = SectionText#section.name}.
|
tunit:put_section(tunit:new(Cursect), SectionText).
|
||||||
|
|
||||||
%% Predefined Sections ---------------------------------------------------------
|
%% Predefined Sections ---------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
%%% -*- erlang-indent-level: 2 -*-
|
%%% -*- erlang-indent-level: 2 -*-
|
||||||
%%%
|
%%%
|
||||||
%%% translation unit handling for pdp10-elf as.
|
%%% translation unit handling for pdp10-elf as.
|
||||||
%%% Copyright (C) 2013-2019 Mikael Pettersson
|
%%% Copyright (C) 2013-2020 Mikael Pettersson
|
||||||
%%%
|
%%%
|
||||||
%%% This file is part of pdp10-tools.
|
%%% This file is part of pdp10-tools.
|
||||||
%%%
|
%%%
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
-module(tunit).
|
-module(tunit).
|
||||||
|
|
||||||
-export([ new/0
|
-export([ new/1
|
||||||
, get_section/2
|
, get_section/2
|
||||||
, put_section/2
|
, put_section/2
|
||||||
, get_symbol/2
|
, get_symbol/2
|
||||||
@@ -33,10 +33,10 @@
|
|||||||
|
|
||||||
%% API -------------------------------------------------------------------------
|
%% API -------------------------------------------------------------------------
|
||||||
|
|
||||||
-spec new() -> #tunit{}.
|
-spec new(string()) -> #tunit{}.
|
||||||
new() ->
|
new(Cursect) ->
|
||||||
#tunit{ sections = #{}
|
#tunit{ sections = #{}
|
||||||
, cursect = false
|
, cursect = Cursect
|
||||||
, symbols = #{}
|
, symbols = #{}
|
||||||
, local_labels = #{}
|
, local_labels = #{}
|
||||||
}.
|
}.
|
||||||
|
|||||||
Reference in New Issue
Block a user