summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/standalone_miri/module_tree.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/standalone_miri/module_tree.cpp b/tools/standalone_miri/module_tree.cpp
index fdc8f587..c70f17dd 100644
--- a/tools/standalone_miri/module_tree.cpp
+++ b/tools/standalone_miri/module_tree.cpp
@@ -146,8 +146,11 @@ bool Parser::parse_one()
if( lex.next() == TokenClass::String )
{
auto reloc_str = ::std::move(lex.consume().strval);
- // TODO: Figure out how to create this allocation...
- //s.val.allocation.alloc().relocations.push_back({ ofs, AllocationPtr::new_string(reloc_str) });
+
+ auto a = Allocation::new_alloc( reloc_str.size() );
+ //a.alloc().set_tag();
+ a.alloc().write_bytes(0, reloc_str.data(), reloc_str.size());
+ s.val.allocation.alloc().relocations.push_back({ ofs, ::std::move(a) });
}
else if( lex.next() == "::" || lex.next() == "<" )
{