diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-11-17 21:55:13 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-11-17 21:55:13 +0000 |
commit | a781b25ba5a6a9537c0149db8c702d31e543e09f (patch) | |
tree | 01efa35523e57800697a6f283fc27a0779f684de /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | |
parent | 31377593bc576c8828a643f01b22b46a6169740c (diff) | |
download | bcm5719-llvm-a781b25ba5a6a9537c0149db8c702d31e543e09f.tar.gz bcm5719-llvm-a781b25ba5a6a9537c0149db8c702d31e543e09f.zip |
DwarfCompileUnit: Add type safety to createGlobalVariableDIE
llvm-svn: 194979
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index cb0e89977c1..59a4842b04b 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/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(); |