Commit 3c6dd88d authored by dbarbera's avatar dbarbera
Browse files

Prepend global string names with a '.' character for avoiding conflicts

parent 2e7d6e11
......@@ -766,8 +766,7 @@ def _get_string_cons(str):
return g.strings[str]
str_val = core.Constant.stringz(str)
# TODO: This names can cause conflicts with user defined variables
gvar_name = 'str_%s' % len(g.strings)
gvar_name = '.str%s' % len(g.strings)
gvar_val = g.module.add_global_variable(str_val.type, gvar_name)
gvar_val.initializer = str_val
g.strings[str] = gvar_val
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment