[llvm] Add adjustVMA option (PR #72870)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 21 00:16:17 PST 2023


================
@@ -245,6 +245,11 @@ struct CommonConfig {
   StringMap<uint64_t> SetSectionType;
   StringMap<StringRef> SymbolsToRename;
 
+  // Adjust section VMA and LMA
+  int64_t SectionVMA = 0;
+  StringRef SectionName;
+  bool SectionSet = false;
----------------
jh7370 wrote:

```suggestion
  // Adjust section VMA and LMA.
  int64_t SectionVMA = 0;
  StringRef SectionName;
  bool SectionSet = false;
```
Could you be more precise with these variable names, please, since the `SectionName` and `SectionSet` variables could be for anything, and the `SectionVMA` variable should probably be named more after the corresponding option? Also, leverage `std::optional` rather than a boolean property, or even just treat an empty `SectionName` as unset, depending on how it's used.

https://github.com/llvm/llvm-project/pull/72870


More information about the llvm-commits mailing list