Constify and don't return a reference.
authorBill Wendling <isanbard@gmail.com>
Wed, 4 Feb 2009 00:05:34 +0000 (00:05 +0000)
committerBill Wendling <isanbard@gmail.com>
Wed, 4 Feb 2009 00:05:34 +0000 (00:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63689 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineFunction.h
lib/CodeGen/MachineFunction.cpp

index b1536a8f75257e8cda7e1a4ee54cd72aa3d50ce9..a039e23399b65c806bd411c915c588700e45a00a 100644 (file)
@@ -318,7 +318,7 @@ public:
   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;
 };
 
 //===--------------------------------------------------------------------===//
index 38dd4033fb93b6087a53ef8ed0564f4312bdc1d5..cf7f39140b8663e25daf837a8973b3001d2b7384 100644 (file)
@@ -397,7 +397,7 @@ unsigned MachineFunction::getOrCreateDebugLocID(unsigned Src, unsigned Line,
 }
 
 /// 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!");