[PATCH] sectiongroup support

Rui Ueyama ruiu at google.com
Thu Mar 6 15:19:12 PST 2014



================
Comment at: include/lld/Core/SymbolTable.h:112
@@ +111,3 @@
+
+  bool groupChildExistsinGroup(const Atom &groupChild, const Atom &groupParent);
+
----------------
s/ExsitsinGroup/ExistsInGroup/

================
Comment at: lib/Core/SymbolTable.cpp:53
@@ +52,3 @@
+      return;
+    } else {
+      // Check if there are any group-parent references
----------------
No else after return.

================
Comment at: lib/Core/SymbolTable.cpp:56
@@ +55,3 @@
+      // if so, coalesce the atom with the group that appeared
+      // before.
+      for (const Reference *r : atom) {
----------------
80 cols.

================
Comment at: lib/Core/SymbolTable.cpp:291
@@ +290,3 @@
+  assert(!name.empty());
+  const Atom *existing = this->findGroup(name);
+  if (existing == nullptr) {
----------------
No this->.

================
Comment at: lib/Core/SymbolTable.cpp:61
@@ +60,3 @@
+        if (r->kindValue() == Reference::kindGroupParent) {
+          addGroupChild(atom, *(r->target()));
+          return;
----------------
*r->target()

================
Comment at: lib/Core/SymbolTable.cpp:360
@@ +359,3 @@
+  if (this->findByName(name) == nullptr)
+    this->addByName(groupChild);
+}
----------------
Remove this->

================
Comment at: lib/Core/SymbolTable.cpp:375
@@ +374,3 @@
+      groupChildInGroup = true;
+      break;
+    }
----------------
You should just return here with true.

================
Comment at: lib/Core/SymbolTable.cpp:378
@@ +377,3 @@
+  }
+  return groupChildInGroup;
+}
----------------
... and return false here.

================
Comment at: lib/ReaderWriter/YAML/ReaderWriterYAML.cpp:189
@@ +188,3 @@
+      return pos->second;
+    } else {
+      _io.setError(Twine("no such group name: ") + name);
----------------
no else after return.


http://llvm-reviews.chandlerc.com/D2961



More information about the llvm-commits mailing list