[cfe-commits] r68853 - /cfe/trunk/lib/CodeGen/Mangle.cpp

Anders Carlsson andersca at mac.com
Fri Apr 10 18:19:46 PDT 2009


Author: andersca
Date: Fri Apr 10 20:19:45 2009
New Revision: 68853

URL: http://llvm.org/viewvc/llvm-project?rev=68853&view=rev
Log:
Don't mangle variables that are at translation unit scope.

Modified:
    cfe/trunk/lib/CodeGen/Mangle.cpp

Modified: cfe/trunk/lib/CodeGen/Mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.cpp?rev=68853&r1=68852&r2=68853&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
+++ cfe/trunk/lib/CodeGen/Mangle.cpp Fri Apr 10 20:19:45 2009
@@ -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";





More information about the cfe-commits mailing list