feat(arc): add optional arg for filename in gscobj header (#153)
This commit is contained in:
parent
2fcbdadc89
commit
4262836191
@ -25,7 +25,7 @@ class assembler
|
||||
|
||||
public:
|
||||
assembler(context const* ctx);
|
||||
auto assemble(assembly const& data) -> buffer;
|
||||
auto assemble(assembly const& data, std::string const& name = {}) -> buffer;
|
||||
|
||||
private:
|
||||
auto assemble_function(function& func) -> void;
|
||||
|
@ -14,7 +14,7 @@ assembler::assembler(context const* ctx) : ctx_{ ctx }, script_{ ctx->endian() =
|
||||
{
|
||||
}
|
||||
|
||||
auto assembler::assemble(assembly const& data) -> buffer
|
||||
auto assembler::assemble(assembly const& data, std::string const& name) -> buffer
|
||||
{
|
||||
assembly_ = &data;
|
||||
script_.clear();
|
||||
@ -26,7 +26,7 @@ auto assembler::assemble(assembly const& data) -> buffer
|
||||
auto head = header{};
|
||||
|
||||
script_.pos((ctx_->props() & props::headerxx) ? 0 : (ctx_->props() & props::header72) ? 72 : 64);
|
||||
process_string("");
|
||||
process_string(name);
|
||||
|
||||
for (auto const& func : assembly_->functions)
|
||||
{
|
||||
@ -183,7 +183,7 @@ auto assembler::assemble(assembly const& data) -> buffer
|
||||
head.profile_count = 0;
|
||||
|
||||
head.flags = 0;
|
||||
head.name = resolve_string("");
|
||||
head.name = resolve_string(name);
|
||||
|
||||
auto endpos = script_.pos();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user