[PATCH] D15012: [ELF] - split RelocationSection<ELFT>::writeTo function.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 29 15:34:37 PST 2015


grimar added inline comments.

================
Comment at: ELF/OutputSections.cpp:196
@@ -195,1 +195,3 @@
 
+template <class ELFT>
+bool RelocationSection<ELFT>::isTlsIsolatedDynamicReloc(SymbolBody *Body,
----------------
ruiu wrote:
> Can you add a function comment?
Done.

================
Comment at: ELF/OutputSections.cpp:202-204
@@ +201,5 @@
+  if (Target->isTlsLocalDynamicReloc(Type)) {
+    P->setSymbolAndType(0, Target->getTlsModuleIndexReloc(), Config->Mips64EL);
+    P->r_offset =
+        Out<ELFT>::Got->getVA() + Out<ELFT>::LocalModuleTlsIndexOffset;
+    return true;
----------------
ruiu wrote:
> If a function is named isXXX, it is usually expected to be a 'pure' function that does not change anything. It updates the arguments, so you may want to change the name.
Ok. Thanks for hint. Renamed to applyTlsDynamicReloc().


http://reviews.llvm.org/D15012





More information about the llvm-commits mailing list