summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-11-17 21:55:13 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-11-17 21:55:13 +0000
commit08e51e1d97e4dd2e5a0b4539da186869916ae5c3 (patch)
treeae153918f99182b25794aefff260efa9d022c797 /lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
parentb923d2f5f5958719214472906e9810de262ab447 (diff)
downloadllvm-08e51e1d97e4dd2e5a0b4539da186869916ae5c3.tar.gz
llvm-08e51e1d97e4dd2e5a0b4539da186869916ae5c3.tar.bz2
llvm-08e51e1d97e4dd2e5a0b4539da186869916ae5c3.tar.xz
DwarfCompileUnit: Add type safety to createGlobalVariableDIE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194979 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index cb0e89977c..59a4842b04 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -1508,8 +1508,7 @@ static const ConstantExpr *getMergedGlobalExpr(const Value *V) {
}
/// createGlobalVariableDIE - create global variable DIE.
-void CompileUnit::createGlobalVariableDIE(const MDNode *N) {
- DIGlobalVariable GV(N);
+void CompileUnit::createGlobalVariableDIE(DIGlobalVariable GV) {
// Check for pre-existence.
if (getDIE(GV))
@@ -1617,7 +1616,7 @@ void CompileUnit::createGlobalVariableDIE(const MDNode *N) {
// it is not a static member.
if (!IsStaticMember)
addConstantValue(VariableDIE, CI, isUnsignedDIType(DD, GTy));
- } else if (const ConstantExpr *CE = getMergedGlobalExpr(N->getOperand(11))) {
+ } else if (const ConstantExpr *CE = getMergedGlobalExpr(GV->getOperand(11))) {
addToAccelTable = true;
// GV is a merged global.
DIEBlock *Block = new (DIEValueAllocator) DIEBlock();