[PATCH] Revert "[PECOFF] Add atoms to the PassManager file"

Rui Ueyama ruiu at google.com
Wed Oct 30 15:48:22 PDT 2013



================
Comment at: lib/ReaderWriter/PECOFF/IdataPass.h:267
@@ -266,6 +266,3 @@
     }
-
-    auto nidatom = new (_alloc) NullImportDirectoryAtom(context);
-    context.file.addAtom(*nidatom);
-
+    new (_alloc) NullImportDirectoryAtom(context);
     connectAtoms(context);
----------------
Shankar Kalpathi Easwaran wrote:
> Does the NullImportDirectoryAtom get added to the PassManager file ? If you could cleanup the change so that a code explicitly adds to the passmanager file, it would be great.
> 
All atoms of type IdataAtom (or a derived class of it) get added to the file, so yes, NullImportDirectoryAtoms get added to the file too. I'd think it's a clean way of doing that, because every time we create a new atom in this pass we always want to add it to the file. If you do that in a different place, there's a risk that you just created an atom but forgot to add it.

Added a comment about that to this line.


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



More information about the llvm-commits mailing list