diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
commit | 461a67fa15370a9ec88f8f8a240bf7c123bb2029 (patch) | |
tree | 6942083d7d56bba40ec790a453ca58ad3baf6832 /include/clang/Frontend/ASTUnit.h | |
parent | 75c3240472ba6ac2669ee72ca67eb72d4e2851fc (diff) |
Diffstat (limited to 'include/clang/Frontend/ASTUnit.h')
-rw-r--r-- | include/clang/Frontend/ASTUnit.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/include/clang/Frontend/ASTUnit.h b/include/clang/Frontend/ASTUnit.h index 1ac4f07a3549..5d04dcd19119 100644 --- a/include/clang/Frontend/ASTUnit.h +++ b/include/clang/Frontend/ASTUnit.h @@ -448,7 +448,7 @@ public: IntrusiveRefCntPtr<ASTReader> getASTReader() const; - StringRef getOriginalSourceFileName() { + StringRef getOriginalSourceFileName() const { return OriginalSourceFile; } @@ -524,26 +524,26 @@ public: /// \brief If \p Loc is a loaded location from the preamble, returns /// the corresponding local location of the main file, otherwise it returns /// \p Loc. - SourceLocation mapLocationFromPreamble(SourceLocation Loc); + SourceLocation mapLocationFromPreamble(SourceLocation Loc) const; /// \brief If \p Loc is a local location of the main file but inside the /// preamble chunk, returns the corresponding loaded location from the /// preamble, otherwise it returns \p Loc. - SourceLocation mapLocationToPreamble(SourceLocation Loc); + SourceLocation mapLocationToPreamble(SourceLocation Loc) const; - bool isInPreambleFileID(SourceLocation Loc); - bool isInMainFileID(SourceLocation Loc); - SourceLocation getStartOfMainFileID(); - SourceLocation getEndOfPreambleFileID(); + bool isInPreambleFileID(SourceLocation Loc) const; + bool isInMainFileID(SourceLocation Loc) const; + SourceLocation getStartOfMainFileID() const; + SourceLocation getEndOfPreambleFileID() const; /// \see mapLocationFromPreamble. - SourceRange mapRangeFromPreamble(SourceRange R) { + SourceRange mapRangeFromPreamble(SourceRange R) const { return SourceRange(mapLocationFromPreamble(R.getBegin()), mapLocationFromPreamble(R.getEnd())); } /// \see mapLocationToPreamble. - SourceRange mapRangeToPreamble(SourceRange R) { + SourceRange mapRangeToPreamble(SourceRange R) const { return SourceRange(mapLocationToPreamble(R.getBegin()), mapLocationToPreamble(R.getEnd())); } @@ -607,7 +607,7 @@ public: /// \brief Returns true if the ASTUnit was constructed from a serialized /// module file. - bool isModuleFile(); + bool isModuleFile() const; std::unique_ptr<llvm::MemoryBuffer> getBufferForFile(StringRef Filename, std::string *ErrorStr = nullptr); |