diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-14 21:04:18 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-14 21:04:18 +0000 |
commit | 9fd87b1db485e2f31d0e5687f9168b370d546847 (patch) | |
tree | d1570b1589af3dbcfcdf2a608350d3a7c81ef3ca /include/clang/Basic/SourceLocation.h | |
parent | 70778c85825a00170c8c70ae351252743463d8dd (diff) |
Added "getCanonicalID()", "isFromSameFile", and "isFromMainFile" to compare
the files of different SourceLocations. These methods correctly handle the
case where a file may have multiple FileIDs due to it being large enough
to be spread across several chunks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49682 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceLocation.h')
-rw-r--r-- | include/clang/Basic/SourceLocation.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/clang/Basic/SourceLocation.h b/include/clang/Basic/SourceLocation.h index 83633ebf85..6bc45057d5 100644 --- a/include/clang/Basic/SourceLocation.h +++ b/include/clang/Basic/SourceLocation.h @@ -249,6 +249,8 @@ public: bool isFileID() const { return Loc.isFileID(); } + unsigned getCanonicalFileID() const; + bool operator==(const FullSourceLoc& RHS) const { return SrcMgr == RHS.SrcMgr && Loc == RHS.Loc; } |