]> git.lizzy.rs Git - rust.git/commitdiff
Fix wrong condition in base::internalize_symbols().
authorMichael Woerister <michaelwoerister@posteo.net>
Tue, 19 Jul 2016 09:47:28 +0000 (05:47 -0400)
committerMichael Woerister <michaelwoerister@posteo.net>
Tue, 19 Jul 2016 09:47:28 +0000 (05:47 -0400)
src/librustc_trans/base.rs

index c8b9fea15ba8b0e12cb4c3557411deddb8f3b056..f9e1a4f16087ef5ac08c00cd7f60bc3fd1e74e4f 100644 (file)
@@ -2286,7 +2286,7 @@ fn internalize_symbols(cx: &CrateContextList, reachable: &HashSet<&str>) {
                 let is_externally_visible = (linkage == llvm::ExternalLinkage as c_uint) ||
                                             (linkage == llvm::LinkOnceODRLinkage as c_uint) ||
                                             (linkage == llvm::WeakODRLinkage as c_uint);
-                let is_definition = llvm::LLVMIsDeclaration(val) != 0;
+                let is_definition = llvm::LLVMIsDeclaration(val) == 0;
 
                 // If this is a definition (as opposed to just a declaration)
                 // and externally visible, check if we can internalize it