Make GlobalValues with non-default visibilility dso_local.

This is similar to r322317, but for visibility. It is not as neat
because we have to special case extern_weak.

The idea is the same as the previous change, make the transition to
explicit dso_local easier for the frontends. With this they only have
to add dso_local to symbols where we need some external information to
decide if it is dso_local (like it being part of an ELF executable).

llvm-svn: 322806
diff --git a/llvm/test/ThinLTO/X86/export.ll b/llvm/test/ThinLTO/X86/export.ll
index 19aac1c..cb87ddd 100644
--- a/llvm/test/ThinLTO/X86/export.ll
+++ b/llvm/test/ThinLTO/X86/export.ll
@@ -5,8 +5,8 @@
 
 ; Ensure statics are promoted/renamed correctly from this file.
 ; RUN: llvm-lto -thinlto-action=promote %t1.bc -thinlto-index=%t3.bc -o - | llvm-dis -o - | FileCheck %s
-; CHECK-DAG: @staticvar.llvm.0 = dso_local hidden global
-; CHECK-DAG: define dso_local hidden void @staticfunc.llvm.0
+; CHECK-DAG: @staticvar.llvm.0 = hidden global
+; CHECK-DAG: define hidden void @staticfunc.llvm.0
 
 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-apple-macosx10.11.0"