summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-02-04 00:05:34 +0000
committerBill Wendling <isanbard@gmail.com>2009-02-04 00:05:34 +0000
commit0b4403f9bda139345b27791ed87abfe20a1233a9 (patch)
tree185efb61919c2fd1c7d779b711f822ac34181a84
parenteb39504426ce9d8282dc6814bd95c9fbcae7da40 (diff)
downloadbcm5719-llvm-0b4403f9bda139345b27791ed87abfe20a1233a9.tar.gz
bcm5719-llvm-0b4403f9bda139345b27791ed87abfe20a1233a9.zip
Constify and don't return a reference.
llvm-svn: 63689
-rw-r--r--llvm/include/llvm/CodeGen/MachineFunction.h2
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineFunction.h b/llvm/include/llvm/CodeGen/MachineFunction.h
index b1536a8f752..a039e23399b 100644
--- a/llvm/include/llvm/CodeGen/MachineFunction.h
+++ b/llvm/include/llvm/CodeGen/MachineFunction.h
@@ -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;
};
//===--------------------------------------------------------------------===//
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index 38dd4033fb9..cf7f39140b8 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -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!");
OpenPOWER on IntegriCloud