[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
Wed Aug 2 20:37:26 PDT 2017


ruiu added inline comments.


================
Comment at: ELF/ScriptParser.cpp:798
 
-uint64_t static getConstant(StringRef S) {
+Expr ScriptParser::getPageSizeExpr() {
+  std::string Location = getCurrentLocation();
----------------
Rename getPageSize.


================
Comment at: ELF/ScriptParser.cpp:800
+  std::string Location = getCurrentLocation();
+  return [=] {
+    if (Target)
----------------
`return [=] -> uint64_t {` to remove casts.


================
Comment at: ELF/ScriptParser.cpp:808
+
+Expr ScriptParser::readConstantExpr() {
+  StringRef S = readParenLiteral();
----------------
Rename readConstant.


https://reviews.llvm.org/D36140





More information about the llvm-commits mailing list