[llvm] r205979 - Revert "Follow-up to r205973: change the return type to const MDNode*."
Adrian Prantl
aprantl at apple.com
Thu Apr 10 11:37:53 PDT 2014
Author: adrian
Date: Thu Apr 10 13:37:53 2014
New Revision: 205979
URL: http://llvm.org/viewvc/llvm-project?rev=205979&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/CodeGen/MachineInstr.h
Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstr.h?rev=205979&r1=205978&r2=205979&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineInstr.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineInstr.h Thu Apr 10 13:37:53 2014
@@ -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
More information about the llvm-commits
mailing list