[PATCH] Proper whole-archive handling
    Rui Ueyama 
    ruiu at google.com
       
    Tue Sep  3 14:43:51 PDT 2013
    
    
  
  Generally LGTM, but a few comments.
================
Comment at: lib/Driver/GnuLdDriver.cpp:193
@@ -192,3 +190,1 @@
-      break;
-
     case OPT_t:
----------------
Thank you for doing this!
================
Comment at: include/lld/Core/LinkingContext.h:271
@@ -278,3 +270,3 @@
   virtual error_code
-  parseFile(std::unique_ptr<MemoryBuffer> &inputBuff,
+  parseFile(LinkerInput &input, std::unique_ptr<MemoryBuffer> &inputBuff,
             std::vector<std::unique_ptr<File> > &result) const = 0;
----------------
Can you move inputBuff into input, so that we don't need to pass both LinkerInput and MemoryBuffer, both representing an input file, to all the member functions? Looks like LinkerInput already has a field for a memory buffer for a file, so we may be able to use the field.
================
Comment at: include/lld/Core/LinkingContext.h:281
@@ -288,3 +280,3 @@
   virtual error_code
-  readFile(StringRef path, std::vector<std::unique_ptr<File> > &result) const;
+  readFile(LinkerInput &input, StringRef path, std::vector<std::unique_ptr<File> > &result) const;
 
----------------
Ditto. Path can be obtained just by calling LinkerInput::getPath(), so no need to pass "pass" as a separate parameter.
http://llvm-reviews.chandlerc.com/D1587
    
    
More information about the llvm-commits
mailing list