diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-01 20:00:16 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-01 20:00:16 +0000 |
commit | c0f18a91ac8e8adef08e8a3a8e5c0f7a99fdbdf9 (patch) | |
tree | 8edcfcc3d745722af3308c8d601ffcb963ecd370 /clang/lib/Frontend/PrintPreprocessedOutput.cpp | |
parent | 015455848e5145079e041510b2e54a4eb3d11b1e (diff) | |
download | bcm5719-llvm-c0f18a91ac8e8adef08e8a3a8e5c0f7a99fdbdf9.tar.gz bcm5719-llvm-c0f18a91ac8e8adef08e8a3a8e5c0f7a99fdbdf9.zip |
Replace a few std::string& with StringRef. NFC.
Patch by Косов Евгений!
llvm-svn: 238774
Diffstat (limited to 'clang/lib/Frontend/PrintPreprocessedOutput.cpp')
-rw-r--r-- | clang/lib/Frontend/PrintPreprocessedOutput.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Frontend/PrintPreprocessedOutput.cpp b/clang/lib/Frontend/PrintPreprocessedOutput.cpp index 037a6a525e2..6192554299a 100644 --- a/clang/lib/Frontend/PrintPreprocessedOutput.cpp +++ b/clang/lib/Frontend/PrintPreprocessedOutput.cpp @@ -128,7 +128,7 @@ public: CharSourceRange FilenameRange, const FileEntry *File, StringRef SearchPath, StringRef RelativePath, const Module *Imported) override; - void Ident(SourceLocation Loc, const std::string &str) override; + void Ident(SourceLocation Loc, StringRef str) override; void PragmaMessage(SourceLocation Loc, StringRef Namespace, PragmaMessageKind Kind, StringRef Str) override; void PragmaDebug(SourceLocation Loc, StringRef DebugType) override; @@ -337,11 +337,11 @@ void PrintPPOutputPPCallbacks::InclusionDirective(SourceLocation HashLoc, /// Ident - Handle #ident directives when read by the preprocessor. /// -void PrintPPOutputPPCallbacks::Ident(SourceLocation Loc, const std::string &S) { +void PrintPPOutputPPCallbacks::Ident(SourceLocation Loc, StringRef S) { MoveToLine(Loc); OS.write("#ident ", strlen("#ident ")); - OS.write(&S[0], S.size()); + OS.write(S.begin(), S.size()); EmittedTokensOnThisLine = true; } |