[PATCH] D26161: '.' is not absolute

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 31 13:30:48 PDT 2016


ruiu added inline comments.


================
Comment at: ELF/LinkerScript.cpp:1190
     StringRef Tok = next();
-    BaseCommand *Cmd = readProvideOrAssignment(Tok, true);
+    BaseCommand *Cmd = readProvideOrAssignment(Tok, false);
     if (!Cmd) {
----------------
instead, replace `false` with `[]() { return false; }`.


================
Comment at: ELF/LinkerScript.h:46
 
   template <typename T>
   Expr(T Val, std::function<bool()> IsAbsolute)
----------------
Instead of T, can we use just uint64_t?


================
Comment at: ELF/LinkerScript.h:49
       : Val(Val), IsAbsolute(IsAbsolute) {}
   template <typename T> Expr(T Val, bool IsAbsolute) : Val(Val) {
     this->IsAbsolute = [=]() { return IsAbsolute; };
----------------
This function is too thin as a wrapper for Expr(T, std::function<bool()>), so I wouldn't add this.


https://reviews.llvm.org/D26161





More information about the llvm-commits mailing list