summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2013-07-22 22:17:24 +0000
committerRui Ueyama <ruiu@google.com>2013-07-22 22:17:24 +0000
commit6c655f237e4a38258a95d47bb3b624fa99716e35 (patch)
treed0021f1a187e3035275a73aba6d6e72e8accd3c6 /lld/lib/ReaderWriter
parent01aa53440b04d51c30ce1f96eab2779f88414cad (diff)
downloadbcm5719-llvm-6c655f237e4a38258a95d47bb3b624fa99716e35.tar.gz
bcm5719-llvm-6c655f237e4a38258a95d47bb3b624fa99716e35.zip
[PECOFF][Driver] Show error message if no input file is given.
llvm-svn: 186882
Diffstat (limited to 'lld/lib/ReaderWriter')
-rw-r--r--lld/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lld/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp b/lld/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp
index 0d5a359a293..a08d9ab6207 100644
--- a/lld/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp
+++ b/lld/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp
@@ -35,6 +35,11 @@ error_code PECOFFTargetInfo::parseFile(
}
bool PECOFFTargetInfo::validateImpl(raw_ostream &diagnostics) {
+ if (_inputFiles.empty()) {
+ diagnostics << "No input files\n";
+ return true;
+ }
+
if (_stackReserve < _stackCommit) {
diagnostics << "Invalid stack size: reserve size must be equal to or "
<< "greater than commit size, but got "
OpenPOWER on IntegriCloud