diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-10-14 17:57:32 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-10-14 17:57:32 +0000 |
commit | cd749a9c07f1de2fb8affde90537efa4bc3e7c54 (patch) | |
tree | b21f6de4e08b89bb7931806bab798fc2a5e3a686 /include/llvm/Linker.h | |
parent | 72621d11de5b873f1695f391eb95f0b336c3d2d4 (diff) | |
download | FreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.zip FreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.tar.gz |
Update llvm to r84119.
Diffstat (limited to 'include/llvm/Linker.h')
-rw-r--r-- | include/llvm/Linker.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/include/llvm/Linker.h b/include/llvm/Linker.h index 2d0c2cd..1e1da86 100644 --- a/include/llvm/Linker.h +++ b/include/llvm/Linker.h @@ -14,11 +14,12 @@ #ifndef LLVM_LINKER_H #define LLVM_LINKER_H -#include "llvm/System/Path.h" #include <memory> #include <vector> +#include "llvm/ADT/StringRef.h" namespace llvm { + namespace sys { class Path; } class Module; class LLVMContext; @@ -32,7 +33,7 @@ class LLVMContext; /// The Linker can link Modules from memory, bitcode files, or bitcode /// archives. It retains a set of search paths in which to find any libraries /// presented to it. By default, the linker will generate error and warning -/// messages to std::cerr but this capability can be turned off with the +/// messages to stderr but this capability can be turned off with the /// QuietWarnings and QuietErrors flags. It can also be instructed to verbosely /// print out the linking actions it is taking with the Verbose flag. /// @brief The LLVM Linker. @@ -52,9 +53,9 @@ class Linker { /// This enumeration is used to control various optional features of the /// linker. enum ControlFlags { - Verbose = 1, ///< Print to std::cerr what steps the linker is taking - QuietWarnings = 2, ///< Don't print warnings to std::cerr. - QuietErrors = 4 ///< Don't print errors to std::cerr. + Verbose = 1, ///< Print to stderr what steps the linker is taking + QuietWarnings = 2, ///< Don't print warnings to stderr. + QuietErrors = 4 ///< Don't print errors to stderr. }; /// @} @@ -64,17 +65,16 @@ 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, ///< name of tool running linker - const std::string& modulename, ///< name of linker's end-result module - LLVMContext& C, ///< Context for global info - unsigned Flags = 0 ///< ControlFlags (one or more |'d together) + Linker(const StringRef &progname, ///< name of tool running linker + const StringRef &modulename, ///< name of linker's end-result module + LLVMContext &C, ///< Context for global info + 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. /// @brief Construct with existing module - Linker(const std::string& progname, Module* aModule, unsigned Flags = 0); + Linker(const StringRef& progname, Module* aModule, unsigned Flags = 0); /// Destruct the Linker. /// @brief Destructor @@ -114,9 +114,9 @@ class Linker { /// true, indicating an error occurred. At most one error is retained so /// this function always returns the last error that occurred. Note that if /// the Quiet control flag is not set, the error string will have already - /// been printed to std::cerr. + /// been printed to stderr. /// @brief Get the text of the last error that occurred. - const std::string& getLastError() const { return Error; } + const std::string &getLastError() const { return Error; } /// @} /// @name Mutators @@ -214,7 +214,7 @@ 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 StringRef &Library, ///< The library to link in bool& is_native ///< Indicates if lib a native library ); @@ -267,7 +267,7 @@ class Linker { /// will be empty (i.e. sys::Path::isEmpty() will return true). /// @returns A sys::Path to the found library /// @brief Find a library from its short name. - sys::Path FindLib(const std::string &Filename); + sys::Path FindLib(const StringRef &Filename); /// @} /// @name Implementation @@ -277,9 +277,9 @@ class Linker { /// Module it contains (wrapped in an auto_ptr), or 0 if an error occurs. std::auto_ptr<Module> LoadObject(const sys::Path& FN); - bool warning(const std::string& message); - bool error(const std::string& message); - void verbose(const std::string& message); + bool warning(const StringRef &message); + bool error(const StringRef &message); + void verbose(const StringRef &message); /// @} /// @name Data |