diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-04 00:55:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-04 00:55:58 +0000 |
commit | 7da5aea7669e6db3e593162b8a123aef06a04d07 (patch) | |
tree | 4af3a673a35337a49ec9d99787d73fd82588c227 /include/clang/Basic/SourceManager.h | |
parent | be395f6b29762c37938637ffef5f59514e04751a (diff) |
make SM::getColumnNumber take a predecomposed FileID/offset, which
makes it clear to clients that they have to pick an instantiation
or spelling location before calling it and allows optimization based
on that.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63698 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceManager.h')
-rw-r--r-- | include/clang/Basic/SourceManager.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index dd76f7896f..340c2e562a 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -481,14 +481,9 @@ public: /// returns zero if the column number isn't known. This may only be called on /// a file sloc, so you must choose a spelling or instantiation location /// before calling this method. - unsigned getColumnNumber(SourceLocation Loc) const; - - unsigned getSpellingColumnNumber(SourceLocation Loc) const { - return getColumnNumber(getSpellingLoc(Loc)); - } - unsigned getInstantiationColumnNumber(SourceLocation Loc) const { - return getColumnNumber(getInstantiationLoc(Loc)); - } + unsigned getColumnNumber(FileID FID, unsigned FilePos) const; + unsigned getSpellingColumnNumber(SourceLocation Loc) const; + unsigned getInstantiationColumnNumber(SourceLocation Loc) const; /// getLineNumber - Given a SourceLocation, return the spelling line number |