[PATCH] [PECOFF] Handle .drectve section.

kledzik at apple.com kledzik at apple.com
Wed Jul 31 18:28:58 PDT 2013



================
Comment at: lib/ReaderWriter/PECOFF/ReaderCOFF.cpp:522
@@ +521,3 @@
+    llvm::raw_string_ostream stream(errorMessage);
+    bool parseFailed = WinLinkDriver::parse(argc, argv, *targetInfo, stream);
+    stream.flush();
----------------
You've constructed a new argv[] here and called WinLinkDriver::parse() on it.  Normally, that constructs a whole new PECOFFTargetInfo.  Is your plan to create a new targetInfo  object and somehow merge that with the original one, or pass in the original one and let parse() modify it?  If the later, we probably need a parameter to parse() explicitly saying that more options are being appended after initial set up, because you may want to do error handling differently.  For instance, not allowing the output file to be renamed.  

Also, if more files or libraries are being added, whatever code is looping over the initial files (in parallel, thanks to Michael), will need to be somehow notified of the change.



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



More information about the llvm-commits mailing list