[llvm-commits] [llvm] r63677 - /llvm/trunk/lib/CodeGen/MachineFunction.cpp
Evan Cheng
evan.cheng at apple.com
Tue Feb 3 15:21:41 PST 2009
On Feb 3, 2009, at 2:55 PM, Bill Wendling wrote:
> Author: void
> Date: Tue Feb 3 16:55:54 2009
> New Revision: 63677
>
> URL: http://llvm.org/viewvc/llvm-project?rev=63677&view=rev
> Log:
> Erm. Would be nice to initialize this variable. . .
>
> Modified:
> llvm/trunk/lib/CodeGen/MachineFunction.cpp
>
> Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFunction.cpp?rev=63677&r1=63676&r2=63677&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/CodeGen/MachineFunction.cpp (original)
> +++ llvm/trunk/lib/CodeGen/MachineFunction.cpp Tue Feb 3 16:55:54
> 2009
> @@ -398,7 +398,7 @@
>
> /// getDebugLocTuple - Get the DebugLocTuple for a given DebugLoc
> object.
> const DebugLocTuple &MachineFunction::getDebugLocTuple(DebugLoc DL) {
It doesn't have to return a reference since DebugLocTuple is light
weight. Also, this method should be const.
Evan
>
> - unsigned Idx;
> + unsigned Idx = DL.getIndex();
> assert(Idx < DebugLocInfo.DebugLocations.size() &&
> "Invalid index into debug locations!");
> return DebugLocInfo.DebugLocations[Idx];
>
>
> _______________________________________________
> 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