[llvm-commits] [llvm] r156244 - /llvm/trunk/include/llvm/Support/SourceMgr.h
Chris Lattner
sabre at nondot.org
Sat May 5 15:04:12 PDT 2012
Author: lattner
Date: Sat May 5 17:04:11 2012
New Revision: 156244
URL: http://llvm.org/viewvc/llvm-project?rev=156244&view=rev
Log:
add missing header <shame>
Modified:
llvm/trunk/include/llvm/Support/SourceMgr.h
Modified: llvm/trunk/include/llvm/Support/SourceMgr.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/SourceMgr.h?rev=156244&r1=156243&r2=156244&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/SourceMgr.h (original)
+++ llvm/trunk/include/llvm/Support/SourceMgr.h Sat May 5 17:04:11 2012
@@ -123,7 +123,14 @@
/// 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.
More information about the llvm-commits
mailing list