diff options
Diffstat (limited to 'include/clang/Frontend/CommandLineSourceLoc.h')
-rw-r--r-- | include/clang/Frontend/CommandLineSourceLoc.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/clang/Frontend/CommandLineSourceLoc.h b/include/clang/Frontend/CommandLineSourceLoc.h index bea468b017..8911cfadd5 100644 --- a/include/clang/Frontend/CommandLineSourceLoc.h +++ b/include/clang/Frontend/CommandLineSourceLoc.h @@ -37,9 +37,15 @@ public: // If both tail splits were valid integers, return success. if (!ColSplit.second.getAsInteger(10, PSL.Column) && - !LineSplit.second.getAsInteger(10, PSL.Line)) + !LineSplit.second.getAsInteger(10, PSL.Line)) { PSL.FileName = LineSplit.first; + // On the command-line, stdin may be specified via "-". Inside the + // compiler, stdin is called "<stdin>". + if (PSL.FileName == "-") + PSL.FileName = "<stdin>"; + } + return PSL; } }; |