From 713adbc4723a9afcd6cd5018915a6070393c8c6d Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 3 Feb 2009 22:49:14 +0000 Subject: [PATCH] Add getter for the index. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63675 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/DebugLoc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/llvm/CodeGen/DebugLoc.h b/include/llvm/CodeGen/DebugLoc.h index b89bf6302a0..51f5116c756 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; }