diff options
author | Chris Lattner <sabre@nondot.org> | 2012-05-05 22:04:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2012-05-05 22:04:11 +0000 |
commit | b3a6194ebabbab1ef6db5603e958228cf723ab1b (patch) | |
tree | d5ec78cf75716b0a2258314b6c948ab345a4a775 /include/llvm/Support/SourceMgr.h | |
parent | bf0e32368e704b46b414f2e0323575a0ff370bda (diff) |
add missing header <shame>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156244 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/SourceMgr.h')
-rw-r--r-- | include/llvm/Support/SourceMgr.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/llvm/Support/SourceMgr.h b/include/llvm/Support/SourceMgr.h index 76967dbf78..f108f732b8 100644 --- a/include/llvm/Support/SourceMgr.h +++ b/include/llvm/Support/SourceMgr.h @@ -123,7 +123,14 @@ public: /// FindLineNumber - Find the line number for the specified location in the /// specified file. This is not a fast method. - unsigned FindLineNumber(SMLoc Loc, int BufferID = -1) const; + unsigned FindLineNumber(SMLoc Loc, int BufferID = -1) const { + return getLineAndColumn(Loc, BufferID).first; + } + + /// getLineAndColumn - Find the line and column number for the specified + /// location in the specified file. This is not a fast method. + std::pair<unsigned, unsigned> + getLineAndColumn(SMLoc Loc, int BufferID = -1) const; /// PrintMessage - Emit a message about the specified location with the /// specified string. |