diff options
author | Adrian Prantl <aprantl@apple.com> | 2014-04-10 18:37:53 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2014-04-10 18:37:53 +0000 |
commit | a7ff9e9e6a121b406925e9cdfa9ace2f880584e4 (patch) | |
tree | 767c06da6615dd3fa6c7a3a17b0411908519e798 | |
parent | cccac6162d2b4fff3caaf0cf7e361a0a5d807f59 (diff) | |
download | llvm-a7ff9e9e6a121b406925e9cdfa9ace2f880584e4.tar.gz llvm-a7ff9e9e6a121b406925e9cdfa9ace2f880584e4.tar.bz2 llvm-a7ff9e9e6a121b406925e9cdfa9ace2f880584e4.tar.xz |
Revert "Follow-up to r205973: change the return type to const MDNode*."
This reverts commit r205974, it turns out that this wasn't such a great idea
after all. Using DIVariable as return value is self-documenting and marginally
more type safe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205979 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/CodeGen/MachineInstr.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index cb85ca8978..9e815623a7 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -246,9 +246,10 @@ public: /// getDebugVariable() - Return the debug variable referenced by /// this DBG_VALUE instruction. - const MDNode *getDebugVariable() const { + DIVariable getDebugVariable() const { assert(isDebugValue() && "not a DBG_VALUE"); - return getOperand(getNumOperands() - 1).getMetadata(); + const MDNode *Var = getOperand(getNumOperands() - 1).getMetadata(); + return DIVariable(Var); } /// emitError - Emit an error referring to the source location of this |