[cfe-commits] r97114 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Sanjiv Gupta sanjiv.gupta at microchip.com
Wed Feb 24 21:20:44 PST 2010


Author: sgupta
Date: Wed Feb 24 23:20:44 2010
New Revision: 97114

URL: http://llvm.org/viewvc/llvm-project?rev=97114&view=rev
Log:
Targets (like pic16) may have mangled the name of global variables, 
so get the name from Var rather than the original decl.

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

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=97114&r1=97113&r2=97114&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Wed Feb 24 23:20:44 2010
@@ -1692,7 +1692,7 @@
     T = CGM.getContext().getConstantArrayType(ET, ConstVal,
                                            ArrayType::Normal, 0);
   }
-  llvm::StringRef DeclName = D->getName();
+  llvm::StringRef DeclName = Var->getName();
   llvm::DIDescriptor DContext = 
     getContextDescriptor(dyn_cast<Decl>(D->getDeclContext()), Unit);
   DebugFactory.CreateGlobalVariable(DContext, DeclName,





More information about the cfe-commits mailing list