aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-04-17 16:43:55 +0000
committerDan Gohman <gohman@apple.com>2010-04-17 16:43:55 +0000
commit82d5eaf23e9588e47c18ce63acb6a5d35d67490a (patch)
tree86b8b2c49a1a2dadbcaeabfd1e9442398f9e3f83 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent9f23dee08c7052af2c4baae3e2b06518896742eb (diff)
Use const_cast instead of a C-style cast to cast away const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101639 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 07d60732d9..454aa5633b 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -2068,8 +2068,9 @@ void DwarfDebug::collectVariableInfo() {
// FIXME : Lift this restriction.
if (MInsn->getNumOperands() != 3)
continue;
- DIVariable DV((MDNode*)(MInsn->getOperand(MInsn->getNumOperands()
- - 1).getMetadata()));
+ DIVariable DV(
+ const_cast<MDNode *>(MInsn->getOperand(MInsn->getNumOperands() - 1)
+ .getMetadata()));
if (DV.getTag() == dwarf::DW_TAG_arg_variable) {
// FIXME Handle inlined subroutine arguments.
DbgVariable *ArgVar = new DbgVariable(DV, MInsn, NULL);