[PATCH] D69093: [llvm-objcopy] --add-symbol: fix crash if SHT_SYMTAB does not exist

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 17 03:04:01 PDT 2019


MaskRay added inline comments.


================
Comment at: tools/llvm-objcopy/ELF/Object.cpp:1557
+
+    auto &SymTab = Obj.addSection<SymbolTableSection>();
+    SymTab.Name = ".symtab";
----------------
grimar wrote:
> Avoid auto?
In all existing call sites `auto` are used.. Anyway, `SymbolTableSection` is clearer (it is not obvious addSection<T> returns `T&`) so I will avoid auto.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69093/new/

https://reviews.llvm.org/D69093





More information about the llvm-commits mailing list