Don't mangle variables that are at translation unit scope.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68853 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp
index 3e685e6..dac9a7c 100644
--- a/lib/CodeGen/Mangle.cpp
+++ b/lib/CodeGen/Mangle.cpp
@@ -112,7 +112,8 @@
if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
if (!Context.getLangOptions().CPlusPlus ||
- isInCLinkageSpecification(D))
+ isInCLinkageSpecification(D) ||
+ D->getDeclContext()->isTranslationUnit())
return false;
Out << "_Z";