Typo.
[oota-llvm.git] / include / llvm / Linker.h
index 60227a724d837746518b95e48de954c2f29c526b..460cad493e7bbdcec8fb6381cbcf7705b415d858 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "llvm/System/Path.h"
 #include <vector>
+#include <memory>
 
 namespace llvm {
 
@@ -52,7 +53,7 @@ class Linker {
     enum ControlFlags {
       Verbose       = 1, ///< Print to std::cerr what steps the linker is taking
       QuietWarnings = 2, ///< Don't print errors and warnings to std::cerr.
-      QuietErrors   = 4, ///< Indicate that this link is for a native executable
+      QuietErrors   = 4  ///< Indicate that this link is for a native executable
     };
 
   /// @}
@@ -62,7 +63,11 @@ class Linker {
     /// Construct the Linker with an empty module which will be given the
     /// name \p progname. \p progname will also be used for error messages.
     /// @brief Construct with empty module
-    Linker(const std::string& progname, unsigned Flags = 0 );
+    Linker(
+        const std::string& progname, ///< name of tool running linker
+        const std::string& modulename, ///< name of linker's end-result module
+        unsigned Flags = 0  ///< ControlFlags (one or more |'d together)
+    );
 
     /// Construct the Linker with a previously defined module, \p aModule. Use
     /// \p progname for the name of the program in error messages.
@@ -153,7 +158,8 @@ class Linker {
     /// @see getLastError
     /// @throws nothing
     bool LinkInItems (
-      const ItemList& Items // Set of libraries/files to link in
+      const ItemList& Items, ///< Set of libraries/files to link in
+      ItemList& NativeItems  ///< Output list of native files/libs
     );
 
     /// This function links the bytecode \p Files into the composite module.
@@ -205,7 +211,8 @@ class Linker {
     /// @returns true if an error occurs, false otherwise
     /// @brief Link one library into the module
     bool LinkInLibrary (
-      const std::string& Library ///< The library to link in
+      const std::string& Library, ///< The library to link in
+      bool& is_file               ///< Indicates if lib is really a bc file
     );
 
     /// This function links one bytecode archive, \p Filename, into the module.
@@ -232,8 +239,11 @@ class Linker {
     /// @returns True if an error occurs, false otherwise.
     /// @brief Link in a module.
     bool LinkInModule(
-      Module* Src     ///< Module linked into \p Dest
-    ) { return LinkModules(Composite, Src, &Error); }
+      Module* Src,              ///< Module linked into \p Dest
+      std::string* ErrorMsg = 0 /// Error/diagnostic string
+    ) { 
+      return LinkModules(Composite, Src, ErrorMsg ); 
+    }
 
     /// This is the heart of the linker. This method will take unconditional
     /// control of the \p Src module and link it into the \p Dest module. The