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

Rui Ueyama ruiu at google.com
Wed Oct 30 14:45:51 PDT 2013


Hi shankarke,

This reverts commit r193479.

The atoms are already added to the file, so re-adding them caused the YAML
writer to write the same atoms twice. That made the YAML reader to fail with
"duplicate atom name" error.

This is not the only error we've got for RoundTripYAMLPass for PECOFF, so we
cannot enable the test yet. More fixes will come.

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

Files:
  lib/ReaderWriter/PECOFF/IdataPass.h

Index: lib/ReaderWriter/PECOFF/IdataPass.h
===================================================================
--- lib/ReaderWriter/PECOFF/IdataPass.h
+++ lib/ReaderWriter/PECOFF/IdataPass.h
@@ -264,21 +264,10 @@
       vector<COFFSharedLibraryAtom *> &atoms = i.second;
       createImportDirectory(context, loadName, atoms);
     }
-
-    auto nidatom = new (_alloc) NullImportDirectoryAtom(context);
-    context.file.addAtom(*nidatom);
-
+    new (_alloc) NullImportDirectoryAtom(context);
     connectAtoms(context);
     createDataDirectoryAtoms(context);
     replaceSharedLibraryAtoms(context);
-    for (auto id : context.importDirectories)
-      context.file.addAtom(*id);
-    for (auto ilt : context.importLookupTables)
-      context.file.addAtom(*ilt);
-    for (auto iat : context.importAddressTables)
-      context.file.addAtom(*iat);
-    for (auto hna : context.hintNameAtoms)
-      context.file.addAtom(*hna);
   }
 
 private:
@@ -314,7 +303,6 @@
     appendAtoms(atoms, context.importAddressTables);
     appendAtoms(atoms, context.dllNameAtoms);
     appendAtoms(atoms, context.hintNameAtoms);
-
     coff::connectAtomsWithLayoutEdge(atoms);
   }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2069.1.patch
Type: text/x-patch
Size: 1173 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131030/c102afd1/attachment.bin>


More information about the llvm-commits mailing list