[llvm-commits] [llvm] r63689 - in /llvm/trunk: include/llvm/CodeGen/MachineFunction.h lib/CodeGen/MachineFunction.cpp

Bill Wendling isanbard at gmail.com
Tue Feb 3 16:05:34 PST 2009


Author: void
Date: Tue Feb  3 18:05:34 2009
New Revision: 63689

URL: http://llvm.org/viewvc/llvm-project?rev=63689&view=rev
Log:
Constify and don't return a reference.

Modified:
    llvm/trunk/include/llvm/CodeGen/MachineFunction.h
    llvm/trunk/lib/CodeGen/MachineFunction.cpp

Modified: llvm/trunk/include/llvm/CodeGen/MachineFunction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFunction.h?rev=63689&r1=63688&r2=63689&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineFunction.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineFunction.h Tue Feb  3 18:05:34 2009
@@ -318,7 +318,7 @@
   unsigned getOrCreateDebugLocID(unsigned Src, unsigned Line, unsigned Col);
 
   /// getDebugLocTuple - Get the DebugLocTuple for a given DebugLoc object.
-  const DebugLocTuple &getDebugLocTuple(DebugLoc DL);
+  DebugLocTuple getDebugLocTuple(DebugLoc DL) const;
 };
 
 //===--------------------------------------------------------------------===//

Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFunction.cpp?rev=63689&r1=63688&r2=63689&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/MachineFunction.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineFunction.cpp Tue Feb  3 18:05:34 2009
@@ -397,7 +397,7 @@
 }
 
 /// getDebugLocTuple - Get the DebugLocTuple for a given DebugLoc object.
-const DebugLocTuple &MachineFunction::getDebugLocTuple(DebugLoc DL) {
+DebugLocTuple MachineFunction::getDebugLocTuple(DebugLoc DL) const {
   unsigned Idx = DL.getIndex();
   assert(Idx < DebugLocInfo.DebugLocations.size() &&
          "Invalid index into debug locations!");





More information about the llvm-commits mailing list