aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/DebugLoc.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-02-03 22:49:14 +0000
committerBill Wendling <isanbard@gmail.com>2009-02-03 22:49:14 +0000
commit713adbc4723a9afcd6cd5018915a6070393c8c6d (patch)
tree631826e960607de8f2ef783d02fad32a794f392d /include/llvm/CodeGen/DebugLoc.h
parenteacf2dc4bb64b5be2ab33339e81b526aa76adfbb (diff)
Add getter for the index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63675 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/DebugLoc.h')
-rw-r--r--include/llvm/CodeGen/DebugLoc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/DebugLoc.h b/include/llvm/CodeGen/DebugLoc.h
index b89bf6302a..51f5116c75 100644
--- a/include/llvm/CodeGen/DebugLoc.h
+++ b/include/llvm/CodeGen/DebugLoc.h
@@ -40,6 +40,8 @@ namespace llvm {
static DebugLoc getUnknownLoc() { DebugLoc L; L.Idx = 0; return L; }
static DebugLoc get(unsigned idx) { DebugLoc L; L.Idx = idx; return L; }
+ unsigned getIndex() const { return Idx; }
+
/// isInvalid - Return true if the DebugLoc is invalid.
bool isInvalid() const { return Idx == ~0U; }