From 577fe1d0c3d891ec1b3fd60db2a6675917c98be0 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 11 Dec 2016 14:08:50 +0800 Subject: Trans - statics and literals --- src/trans/codegen.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/trans/codegen.cpp') diff --git a/src/trans/codegen.cpp b/src/trans/codegen.cpp index caba6e43..a4cec3e2 100644 --- a/src/trans/codegen.cpp +++ b/src/trans/codegen.cpp @@ -251,13 +251,13 @@ void Trans_Codegen(const ::std::string& outfile, const ::HIR::Crate& crate, cons assert(ent.second->ptr); const auto& stat = *ent.second->ptr; - if( ! stat.m_value_res.is_Invalid() ) + if( stat.m_value_res.is_Invalid() ) { - codegen->emit_static_local(ent.first, stat, ent.second->pp); + codegen->emit_static_ext(ent.first, stat, ent.second->pp); } else { - codegen->emit_static_ext(ent.first, stat, ent.second->pp); + codegen->emit_static_local(ent.first, stat, ent.second->pp); } } -- cgit v1.2.3