[cfe-commits] r113125 - /cfe/trunk/lib/Lex/Pragma.cpp
Chris Lattner
sabre at nondot.org
Sun Sep 5 16:16:09 PDT 2010
Author: lattner
Date: Sun Sep 5 18:16:09 2010
New Revision: 113125
URL: http://llvm.org/viewvc/llvm-project?rev=113125&view=rev
Log:
fix 7320: we can't delete a trailing space if it doesn't exist.
Modified:
cfe/trunk/lib/Lex/Pragma.cpp
Modified: cfe/trunk/lib/Lex/Pragma.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Pragma.cpp?rev=113125&r1=113124&r2=113125&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/Pragma.cpp (original)
+++ cfe/trunk/lib/Lex/Pragma.cpp Sun Sep 5 18:16:09 2010
@@ -384,7 +384,9 @@
Lex(DependencyTok);
}
- Message.erase(Message.end()-1);
+ // Remove the trailing ' ' if present.
+ if (!Message.empty())
+ Message.erase(Message.end()-1);
Diag(FilenameTok, diag::pp_out_of_date_dependency) << Message;
}
}
More information about the cfe-commits
mailing list