summaryrefslogtreecommitdiffstats
path: root/lib/Frontend/PrintPreprocessedOutput.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-06-09 19:08:19 +0000
committerdim <dim@FreeBSD.org>2015-06-09 19:08:19 +0000
commitbb9760db9b86e93a638ed430d0a14785f7ff9064 (patch)
treea59f5569ef36d00388c0428426abef26aa9105b6 /lib/Frontend/PrintPreprocessedOutput.cpp
parent3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65 (diff)
downloadFreeBSD-src-bb9760db9b86e93a638ed430d0a14785f7ff9064.zip
FreeBSD-src-bb9760db9b86e93a638ed430d0a14785f7ff9064.tar.gz
Vendor import of clang trunk r239412:
https://llvm.org/svn/llvm-project/cfe/trunk@239412
Diffstat (limited to 'lib/Frontend/PrintPreprocessedOutput.cpp')
-rw-r--r--lib/Frontend/PrintPreprocessedOutput.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Frontend/PrintPreprocessedOutput.cpp b/lib/Frontend/PrintPreprocessedOutput.cpp
index 037a6a5..6192554 100644
--- a/lib/Frontend/PrintPreprocessedOutput.cpp
+++ b/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;
}
OpenPOWER on IntegriCloud