Skip to content

Commit 10d54cc

Browse files
committed
Changed the CurFilename to uninit.
1 parent eda1496 commit 10d54cc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clang/lib/Frontend/PrintPreprocessedOutput.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,11 @@ void PrintPPOutputPPCallbacks::WriteLineInfo(unsigned LineNo,
289289
// Emit #line directives or GNU line markers depending on what mode we're in.
290290
StringRef CurFilenameWithNoLeaningDotSlash =
291291
remove_leading_dotbackslah(CurFilename.str());
292-
if ((strcmp(CurFilenameWithNoLeaningDotSlash.data(),
293-
PP.getPreprocessorOpts().IncludeFooter.data()) == 0) ||
294-
(strcmp(CurFilenameWithNoLeaningDotSlash.data(),
295-
PP.getPreprocessorOpts().IncludeHeader.data()) == 0)) {
296-
CurFilename = StringRef();
292+
if ((CurFilenameWithNoLeaningDotSlash ==
293+
PP.getPreprocessorOpts().IncludeFooter) ||
294+
CurFilenameWithNoLeaningDotSlash ==
295+
PP.getPreprocessorOpts().IncludeHeader) {
296+
CurFilename = "<uninit>";
297297
}
298298
if (UseLineDirectives) {
299299
*OS << "#line" << ' ' << LineNo << ' ' << '"';

0 commit comments

Comments
 (0)