diff options
author | Devang Patel <dpatel@apple.com> | 2010-08-10 17:53:33 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-08-10 17:53:33 +0000 |
commit | 25c2c8fb9309050612009a6571e2660e75531348 (patch) | |
tree | d57ba46aeba697acab9e6927ab31a081c4e19a1d /lib/CodeGen/CGDebugInfo.cpp | |
parent | 9d5600a8349cdda4e4971ebbbf7aa15a9da8bba7 (diff) |
Simplify code and add comments, in code that generate debug info for constant integer globals, based on Chris's feedback.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110694 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 5ec68c0ff0..a75ff10476 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1801,7 +1801,9 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var, true/*definition*/, Var); } -void CGDebugInfo::EmitGlobalVariable(llvm::Constant *C, const ValueDecl *VD, +/// EmitGlobalVariable - Emit global variable's debug info. +void CGDebugInfo::EmitGlobalVariable(const ValueDecl *VD, + llvm::ConstantInt *Init, CGBuilderTy &Builder) { // Create the descriptor for the variable. llvm::DIFile Unit = getOrCreateFile(VD->getLocation()); @@ -1809,7 +1811,7 @@ void CGDebugInfo::EmitGlobalVariable(llvm::Constant *C, const ValueDecl *VD, DebugFactory.CreateGlobalVariable(Unit, Name, Name, Name, Unit, getLineNumber(VD->getLocation()), getOrCreateType(VD->getType(), Unit), - true, true, C); + true, true, Init); } /// getOrCreateNamesSpace - Return namespace descriptor for the given |