aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PrintPreprocessedOutput.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-09-17 00:41:18 +0000
committerTed Kremenek <kremenek@apple.com>2010-09-17 00:41:18 +0000
commit2346513da49f0a3e4f0deaf198e708d18390b41e (patch)
tree0294a4e98cf9272e9252219a0e7847c227235ede /lib/Frontend/PrintPreprocessedOutput.cpp
parent2008feead855f08500fb01ff43ef5eebee05d1e5 (diff)
Handle '#line' in '-E' that has an empty file name. Fixes <rdar://problem/8439412>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114142 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PrintPreprocessedOutput.cpp')
-rw-r--r--lib/Frontend/PrintPreprocessedOutput.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Frontend/PrintPreprocessedOutput.cpp b/lib/Frontend/PrintPreprocessedOutput.cpp
index d0aef2918c..00ab3c3176 100644
--- a/lib/Frontend/PrintPreprocessedOutput.cpp
+++ b/lib/Frontend/PrintPreprocessedOutput.cpp
@@ -164,11 +164,11 @@ void PrintPPOutputPPCallbacks::WriteLineInfo(unsigned LineNo,
// Emit #line directives or GNU line markers depending on what mode we're in.
if (UseLineDirective) {
OS << "#line" << ' ' << LineNo << ' ' << '"';
- OS.write(&CurFilename[0], CurFilename.size());
+ OS.write(CurFilename.data(), CurFilename.size());
OS << '"';
} else {
OS << '#' << ' ' << LineNo << ' ' << '"';
- OS.write(&CurFilename[0], CurFilename.size());
+ OS.write(CurFilename.data(), CurFilename.size());
OS << '"';
if (ExtraLen)