[lld] r194539 - [PECOFF] Do not print error if length of .drectve is 0.
Rui Ueyama
ruiu at google.com
Tue Nov 12 17:19:08 PST 2013
Author: ruiu
Date: Tue Nov 12 19:19:08 2013
New Revision: 194539
URL: http://llvm.org/viewvc/llvm-project?rev=194539&view=rev
Log:
[PECOFF] Do not print error if length of .drectve is 0.
Modified:
lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
Modified: lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp?rev=194539&r1=194538&r2=194539&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp Tue Nov 12 19:19:08 2013
@@ -666,6 +666,9 @@ private:
array = array.slice(3);
}
+ if (array.size() == 0)
+ return "";
+
size_t len = 0;
size_t e = array.size();
while (len < e && array[len] != '\0')
More information about the llvm-commits
mailing list