diff options
author | Chris Lattner <sabre@nondot.org> | 2009-01-19 06:46:35 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-01-19 06:46:35 +0000 |
commit | bcc2a67e5180612417727cbdd8afd0f79fdf726d (patch) | |
tree | 6ec0a17c76a1d8ac80373d73b1e732d125dffc79 /include/clang/Basic/SourceLocation.h | |
parent | ec0d7a6f4b0699cc9960e6d9fee0f957c64d1cf9 (diff) |
Make SourceLocation::getFileLoc private to reduce the API exposure of
SourceLocation. This requires making some cleanups to token pasting
and _Pragma expansion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62490 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceLocation.h')
-rw-r--r-- | include/clang/Basic/SourceLocation.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/clang/Basic/SourceLocation.h b/include/clang/Basic/SourceLocation.h index 4c0f0e9d46..858b763666 100644 --- a/include/clang/Basic/SourceLocation.h +++ b/include/clang/Basic/SourceLocation.h @@ -64,6 +64,7 @@ private: /// an input translation unit. class SourceLocation { unsigned ID; + friend class SourceManager; public: enum { // FileID Layout: @@ -100,6 +101,7 @@ public: bool isValid() const { return ID != 0; } bool isInvalid() const { return ID == 0; } +private: static SourceLocation getFileLoc(unsigned ChunkID, unsigned FilePos) { SourceLocation L; // If a FilePos is larger than (1<<FilePosBits), the SourceManager makes @@ -116,6 +118,7 @@ public: L.ID = (ChunkID << FilePosBits) | FilePos; return L; } +public: static bool isValidMacroSpellingOffs(int Val) { if (Val >= 0) |