Clean up out-of-date comments and some stray whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176729 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eli Bendersky 2013-03-08 22:29:44 +00:00
parent cacf971079
commit d25c05efd5
2 changed files with 12 additions and 14 deletions

View File

@ -31,12 +31,12 @@ class StringRef;
/// In this case the Linker still retains ownership of the Module. If the /// In this case the Linker still retains ownership of the Module. If the
/// releaseModule() method is used, the ownership of the Module is transferred /// releaseModule() method is used, the ownership of the Module is transferred
/// to the caller and the Linker object is only suitable for destruction. /// to the caller and the Linker object is only suitable for destruction.
/// The Linker can link Modules from memory, bitcode files, or bitcode /// The Linker can link Modules from memory. It retains a set of search paths
/// archives. It retains a set of search paths in which to find any libraries /// in which to find any libraries presented to it. By default, the linker
/// presented to it. By default, the linker will generate error and warning /// will generate error and warning messages to stderr but this capability can
/// messages to stderr but this capability can be turned off with the /// be turned off with the QuietWarnings and QuietErrors flags. It can also be
/// QuietWarnings and QuietErrors flags. It can also be instructed to verbosely /// instructed to verbosely print out the linking actions it is taking with
/// print out the linking actions it is taking with the Verbose flag. /// the Verbose flag.
/// @brief The LLVM Linker. /// @brief The LLVM Linker.
class Linker { class Linker {
@ -50,12 +50,12 @@ class Linker {
QuietWarnings = 2, ///< Don't print warnings to stderr. QuietWarnings = 2, ///< Don't print warnings to stderr.
QuietErrors = 4 ///< Don't print errors to stderr. QuietErrors = 4 ///< Don't print errors to stderr.
}; };
enum LinkerMode { enum LinkerMode {
DestroySource = 0, // Allow source module to be destroyed. DestroySource = 0, // Allow source module to be destroyed.
PreserveSource = 1 // Preserve the source module. PreserveSource = 1 // Preserve the source module.
}; };
/// @} /// @}
/// @name Constructors /// @name Constructors
/// @{ /// @{
@ -146,17 +146,15 @@ class Linker {
void setFlags(unsigned flags) { Flags = flags; } void setFlags(unsigned flags) { Flags = flags; }
/// This method links the \p Src module into the Linker's Composite module /// This method links the \p Src module into the Linker's Composite module
/// by calling LinkModules. All the other LinkIn* methods eventually /// by calling LinkModules.
/// result in calling this method to link a Module into the Linker's
/// composite.
/// @see LinkModules /// @see LinkModules
/// @returns True if an error occurs, false otherwise. /// @returns True if an error occurs, false otherwise.
/// @brief Link in a module. /// @brief Link in a module.
bool LinkInModule( bool LinkInModule(
Module* Src, ///< Module linked into \p Dest Module* Src, ///< Module linked into \p Dest
std::string* ErrorMsg = 0 /// Error/diagnostic string std::string* ErrorMsg = 0 /// Error/diagnostic string
) { ) {
return LinkModules(Composite, Src, Linker::DestroySource, ErrorMsg ); return LinkModules(Composite, Src, Linker::DestroySource, ErrorMsg);
} }
/// This is the heart of the linker. This method will take unconditional /// This is the heart of the linker. This method will take unconditional

View File

@ -1292,7 +1292,7 @@ bool ModuleLinker::run() {
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
/// LinkModules - This function links two modules together, with the resulting /// LinkModules - This function links two modules together, with the resulting
/// left module modified to be the composite of the two input modules. If an /// Dest module modified to be the composite of the two input modules. If an
/// error occurs, true is returned and ErrorMsg (if not null) is set to indicate /// error occurs, true is returned and ErrorMsg (if not null) is set to indicate
/// the problem. Upon failure, the Dest module could be in a modified state, /// the problem. Upon failure, the Dest module could be in a modified state,
/// and shouldn't be relied on to be consistent. /// and shouldn't be relied on to be consistent.