[PATCH] D64473: [Coding style change][lld] Rename variables for non-ELF ports.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 08:40:55 PDT 2019


MaskRay added a comment.

Many variables in `assert` and `LLVM_DEBUG` are not processed. You probably need to apply the tool on a debug (or `-DLLVM_ENABLE_ASSERTIONS=on`) build .



================
Comment at: lld/wasm/Symbols.cpp:96
 uint32_t Symbol::getOutputSymbolIndex() const {
   assert(OutputSymbolIndex != INVALID_INDEX);
+  return outputSymbolIndex;
----------------
outputSymbolIndex


================
Comment at: lld/wasm/Symbols.cpp:101
+void Symbol::setOutputSymbolIndex(uint32_t index) {
   LLVM_DEBUG(dbgs() << "setOutputSymbolIndex " << Name << " -> " << Index
                     << "\n");
----------------
name index


================
Comment at: lld/wasm/Symbols.cpp:103
                     << "\n");
   assert(OutputSymbolIndex == INVALID_INDEX);
+  outputSymbolIndex = index;
----------------
outputSymbolIndex


================
Comment at: lld/wasm/Symbols.cpp:108
+void Symbol::setGOTIndex(uint32_t index) {
   LLVM_DEBUG(dbgs() << "setGOTIndex " << Name << " -> " << Index << "\n");
   assert(GOTIndex == INVALID_INDEX);
----------------
name index


================
Comment at: lld/wasm/Symbols.cpp:109
   LLVM_DEBUG(dbgs() << "setGOTIndex " << Name << " -> " << Index << "\n");
   assert(GOTIndex == INVALID_INDEX);
   // Any symbol that is assigned a GOT entry must be exported othewise the
----------------
gotIndex


================
Comment at: lld/wasm/Symbols.cpp:191
   LLVM_DEBUG(dbgs() << "setTableIndex " << Name << " -> " << Index << "\n");
   assert(TableIndex == INVALID_INDEX);
+  tableIndex = index;
----------------
assert(tableIndex == INVALID_INDEX);


================
Comment at: lld/wasm/Symbols.h:115
   uint32_t getGOTIndex() const {
     assert(GOTIndex != INVALID_INDEX);
+    return gotIndex;
----------------
`gotIndex`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64473





More information about the llvm-commits mailing list