From 3353f9f983c8bf75af288b1ab60e0fdffb1d003a Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Sat, 1 Oct 2016 16:38:28 +0000 Subject: Use StringRef for MemoryBuffer identifier API (NFC) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283043 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/SourceManager.h | 2 +- include/clang/Lex/DirectoryLookup.h | 2 +- include/clang/Lex/HeaderMap.h | 2 +- include/clang/Rewrite/Core/HTMLRewrite.h | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index 6610c56b15..45187e58cb 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -1291,7 +1291,7 @@ public: /// /// Note that this name does not respect \#line directives. Use /// getPresumedLoc for normal clients. - const char *getBufferName(SourceLocation Loc, bool *Invalid = nullptr) const; + StringRef getBufferName(SourceLocation Loc, bool *Invalid = nullptr) const; /// \brief Return the file characteristic of the specified source /// location, indicating whether this is a normal file, a system diff --git a/include/clang/Lex/DirectoryLookup.h b/include/clang/Lex/DirectoryLookup.h index ee0af292e6..dcd58f434f 100644 --- a/include/clang/Lex/DirectoryLookup.h +++ b/include/clang/Lex/DirectoryLookup.h @@ -88,7 +88,7 @@ public: /// getName - Return the directory or filename corresponding to this lookup /// object. - const char *getName() const; + StringRef getName() const; /// getDir - Return the directory that this entry refers to. /// diff --git a/include/clang/Lex/HeaderMap.h b/include/clang/Lex/HeaderMap.h index 8466f1a24d..58bf79579a 100644 --- a/include/clang/Lex/HeaderMap.h +++ b/include/clang/Lex/HeaderMap.h @@ -45,7 +45,7 @@ public: SmallVectorImpl &DestPath) const; /// Return the filename of the headermap. - const char *getFileName() const; + StringRef getFileName() const; /// Print the contents of this headermap to stderr. void dump() const; diff --git a/include/clang/Rewrite/Core/HTMLRewrite.h b/include/clang/Rewrite/Core/HTMLRewrite.h index dafdf51ce6..1fd7c7a3f8 100644 --- a/include/clang/Rewrite/Core/HTMLRewrite.h +++ b/include/clang/Rewrite/Core/HTMLRewrite.h @@ -62,8 +62,8 @@ namespace html { void AddLineNumbers(Rewriter& R, FileID FID); - void AddHeaderFooterInternalBuiltinCSS(Rewriter& R, FileID FID, - const char *title = nullptr); + void AddHeaderFooterInternalBuiltinCSS(Rewriter &R, FileID FID, + StringRef title); /// SyntaxHighlight - Relex the specified FileID and annotate the HTML with /// information about keywords, comments, etc. -- cgit v1.2.3