[PATCH] [ELF] Emit DT_TEXTREL dynamic table flag

Simon Atanasyan simon at atanasyan.com
Mon May 12 13:38:31 PDT 2014


================
Comment at: lib/ReaderWriter/ELF/SectionChunks.h:959
@@ +958,3 @@
+  bool canModifyReadonlySection() const {
+    for (const auto &rel : _relocs)
+      if ((rel.first->permissions() & DefinedAtom::permRW_) !=
----------------
Rui Ueyama wrote:
> can you expand "auto"?
The type name of `rel` is rather long - `std::pair<const DefinedAtom *, const Reference *>`. It is possible to make it shorter using typedefs but I cannot invent a good short name.

================
Comment at: lib/ReaderWriter/ELF/SectionChunks.h:960
@@ +959,3 @@
+    for (const auto &rel : _relocs)
+      if ((rel.first->permissions() & DefinedAtom::permRW_) !=
+          DefinedAtom::permRW_)
----------------
Rui Ueyama wrote:
> nit: fit in one line
Yeah, the expression does not look good. But how can we fit it into one line?

http://reviews.llvm.org/D3716






More information about the llvm-commits mailing list