[PATCH] D36140: [ELF] - Do not segfault if linkerscript tries to access Target too early.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 3 04:36:51 PDT 2017


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: ELF/ScriptParser.cpp:813
   if (S == "MAXPAGESIZE")
-    return Config->MaxPageSize;
-  error("unknown constant: " + S);
-  return 0;
+    return [=] { return Config->MaxPageSize; };
+  setError("unknown constant: " + S);
----------------
This doesn't capture anything so remove =


https://reviews.llvm.org/D36140





More information about the llvm-commits mailing list