[llvm] r205974 - Follow-up to r205973: change the return type to const MDNode*.

David Blaikie dblaikie at gmail.com
Thu Apr 10 11:04:01 PDT 2014


On Thu, Apr 10, 2014 at 10:50 AM, Adrian Prantl <aprantl at apple.com> wrote:
> Author: adrian
> Date: Thu Apr 10 12:50:30 2014
> New Revision: 205974
>
> URL: http://llvm.org/viewvc/llvm-project?rev=205974&view=rev
> Log:
> Follow-up to r205973: change the return type to const MDNode*.

It'd be helpful to explain (in the commit message, ideally) the
motivation for changes like this.

>
> 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=205974&r1=205973&r2=205974&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/CodeGen/MachineInstr.h (original)
> +++ llvm/trunk/include/llvm/CodeGen/MachineInstr.h Thu Apr 10 12:50:30 2014
> @@ -246,10 +246,9 @@ public:
>
>    /// getDebugVariable() - Return the debug variable referenced by
>    /// this DBG_VALUE instruction.
> -  DIVariable getDebugVariable() const {
> +  const MDNode *getDebugVariable() const {
>      assert(isDebugValue() && "not a DBG_VALUE");
> -    const MDNode *Var = getOperand(getNumOperands() - 1).getMetadata();
> -    return DIVariable(Var);
> +    return getOperand(getNumOperands() - 1).getMetadata();
>    }
>
>    /// emitError - Emit an error referring to the source location of this
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list