[lld] r228753 - GNU: Rename parseZOption because it actually parses only -z max-page-size.

Rui Ueyama ruiu at google.com
Tue Feb 10 13:40:51 PST 2015


Author: ruiu
Date: Tue Feb 10 15:40:51 2015
New Revision: 228753

URL: http://llvm.org/viewvc/llvm-project?rev=228753&view=rev
Log:
GNU: Rename parseZOption because it actually parses only -z max-page-size.

Modified:
    lld/trunk/lib/Driver/GnuLdDriver.cpp

Modified: lld/trunk/lib/Driver/GnuLdDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/GnuLdDriver.cpp?rev=228753&r1=228752&r2=228753&view=diff
==============================================================================
--- lld/trunk/lib/Driver/GnuLdDriver.cpp (original)
+++ lld/trunk/lib/Driver/GnuLdDriver.cpp Tue Feb 10 15:40:51 2015
@@ -151,8 +151,8 @@ static bool parseDefsymAsAlias(StringRef
   return !target.empty();
 }
 
-// Parses dashz options for max-page-size.
-static bool parseZOption(StringRef opt, uint64_t &val) {
+// Parses -z max-page-size=<value>
+static bool parseMaxPageSize(StringRef opt, uint64_t &val) {
   size_t equalPos = opt.find('=');
   if (equalPos == 0 || equalPos == StringRef::npos)
     return false;
@@ -560,7 +560,7 @@ bool GnuLdDriver::parse(int argc, const
       // Error if the page size user set is less than the maximum page size
       // and greather than the default page size and the user page size is a
       // modulo of the default page size.
-      if ((!parseZOption(opt, maxPageSize)) ||
+      if ((!parseMaxPageSize(opt, maxPageSize)) ||
           (maxPageSize < ctx->getPageSize()) ||
           (maxPageSize % ctx->getPageSize())) {
         diag << "invalid option: " << opt << "\n";





More information about the llvm-commits mailing list