summaryrefslogtreecommitdiff
path: root/src/trans/codegen.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-12-11 14:08:50 +0800
committerJohn Hodge <tpg@mutabah.net>2016-12-11 14:08:50 +0800
commit577fe1d0c3d891ec1b3fd60db2a6675917c98be0 (patch)
tree3e5c1004daca87e0dd191af8bceb5fb7bf0e57ba /src/trans/codegen.cpp
parenta32d452ee6792663a1d73d4b082c224a20c3caa4 (diff)
downloadmrust-577fe1d0c3d891ec1b3fd60db2a6675917c98be0.tar.gz
Trans - statics and literals
Diffstat (limited to 'src/trans/codegen.cpp')
-rw-r--r--src/trans/codegen.cpp6
1 files changed, 3 insertions, 3 deletions
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);
}
}