From 39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 20 Feb 2011 13:06:31 +0000 Subject: Vendor import of clang trunk r126079: http://llvm.org/svn/llvm-project/cfe/trunk@126079 --- include/clang/Frontend/CommandLineSourceLoc.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include/clang/Frontend/CommandLineSourceLoc.h') diff --git a/include/clang/Frontend/CommandLineSourceLoc.h b/include/clang/Frontend/CommandLineSourceLoc.h index bea468b..8911cfa 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 "". + if (PSL.FileName == "-") + PSL.FileName = ""; + } + return PSL; } }; -- cgit v1.1