[PATCH] D38360: [ELF] Set Dot initially to --image-base value when using linker scripts

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 2 09:51:03 PDT 2017


ruiu added inline comments.


================
Comment at: ELF/Driver.cpp:911-912
 
 // Parses -image-base option.
 static uint64_t getImageBase(opt::InputArgList &Args) {
   // Use default if no -image-base option is given.
----------------
This and other functions in this file are intended to be "pure" functions, that don't have any side-effects. They are "getters" and are not expected to do anything other than returning values.  So please do not set a value to a Config member from a "get" function.


https://reviews.llvm.org/D38360





More information about the llvm-commits mailing list