summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2013-06-08 03:59:00 +0000
committerRui Ueyama <ruiu@google.com>2013-06-08 03:59:00 +0000
commiteb0cc96e4b0a1d6f36a00d92b82dc58a97f4bcd2 (patch)
tree1fee4f3fb56521f5dd64ef44516a18747ddc2ca1 /lld/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp
parent7b5592bc0b75f04293768a92f4db01a703b82ce0 (diff)
downloadbcm5719-llvm-eb0cc96e4b0a1d6f36a00d92b82dc58a97f4bcd2.tar.gz
bcm5719-llvm-eb0cc96e4b0a1d6f36a00d92b82dc58a97f4bcd2.zip
[PECOFF][Driver] Add -stack command line option.
llvm-svn: 183604
Diffstat (limited to 'lld/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp')
-rw-r--r--lld/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lld/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp b/lld/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp
index 516479e65d5..a4c3e7ec4ab 100644
--- a/lld/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp
+++ b/lld/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp
@@ -23,6 +23,13 @@ error_code PECOFFTargetInfo::parseFile(
}
bool PECOFFTargetInfo::validate(raw_ostream &diagnostics) {
+ if (_stackReserve < _stackCommit) {
+ diagnostics << "Invalid stack size: reserve size must be equal to or "
+ << "greater than commit size, but got "
+ << _stackCommit << " and " << _stackReserve << ".\n";
+ return true;
+ }
+
_reader = createReaderPECOFF(*this);
_writer = createWriterPECOFF(*this);
return false;
OpenPOWER on IntegriCloud