[llvm-commits] [llvm] r123152 - in /llvm/trunk: lib/Archive/Archive.cpp lib/Archive/ArchiveWriter.cpp tools/llvm-ar/llvm-ar.cpp
Michael J. Spencer
bigcheesegs at gmail.com
Sun Jan 9 18:34:40 PST 2011
Author: mspencer
Date: Sun Jan 9 20:34:40 2011
New Revision: 123152
URL: http://llvm.org/viewvc/llvm-project?rev=123152&view=rev
Log:
Fix Whitespace.
Modified:
llvm/trunk/lib/Archive/Archive.cpp
llvm/trunk/lib/Archive/ArchiveWriter.cpp
llvm/trunk/tools/llvm-ar/llvm-ar.cpp
Modified: llvm/trunk/lib/Archive/Archive.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Archive/Archive.cpp?rev=123152&r1=123151&r2=123152&view=diff
==============================================================================
--- llvm/trunk/lib/Archive/Archive.cpp (original)
+++ llvm/trunk/lib/Archive/Archive.cpp Sun Jan 9 20:34:40 2011
@@ -166,19 +166,19 @@
delete mapfile;
mapfile = 0;
base = 0;
-
+
// Forget the entire symbol table
symTab.clear();
symTabSize = 0;
-
+
firstFileOffset = 0;
-
+
// Free the foreign symbol table member
if (foreignST) {
delete foreignST;
foreignST = 0;
}
-
+
// Delete any Modules and ArchiveMember's we've allocated as a result of
// symbol table searches.
for (ModuleMap::iterator I=modules.begin(), E=modules.end(); I != E; ++I ) {
@@ -200,7 +200,7 @@
if (!GI->isDeclaration() && !GI->hasLocalLinkage())
if (!GI->getName().empty())
symbols.push_back(GI->getName());
-
+
// Loop over functions
for (Module::iterator FI = M->begin(), FE = M->end(); FI != FE; ++FI)
if (!FI->isDeclaration() && !FI->hasLocalLinkage())
@@ -226,14 +226,14 @@
+ ec.message();
return true;
}
-
+
Module *M = ParseBitcodeFile(Buffer.get(), Context, ErrMsg);
if (!M)
return true;
-
+
// Get the symbols
getSymbols(M, symbols);
-
+
// Done with the module.
delete M;
return true;
@@ -248,14 +248,14 @@
// Get the module.
OwningPtr<MemoryBuffer> Buffer(
MemoryBuffer::getMemBufferCopy(StringRef(BufPtr, Length),ModuleID.c_str()));
-
+
Module *M = ParseBitcodeFile(Buffer.get(), Context, ErrMsg);
if (!M)
return 0;
-
+
// Get the symbols
getSymbols(M, symbols);
-
+
// Done with the module. Note that it's the caller's responsibility to delete
// the Module.
return M;
Modified: llvm/trunk/lib/Archive/ArchiveWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Archive/ArchiveWriter.cpp?rev=123152&r1=123151&r2=123152&view=diff
==============================================================================
--- llvm/trunk/lib/Archive/ArchiveWriter.cpp (original)
+++ llvm/trunk/lib/Archive/ArchiveWriter.cpp Sun Jan 9 20:34:40 2011
@@ -155,7 +155,7 @@
// Insert a file into the archive before some other member. This also takes care
// of extracting the necessary flags and information from the file.
bool
-Archive::addFileBefore(const sys::Path& filePath, iterator where,
+Archive::addFileBefore(const sys::Path& filePath, iterator where,
std::string* ErrMsg) {
bool Exists;
if (sys::fs::exists(filePath.str(), Exists) || !Exists) {
@@ -232,7 +232,7 @@
std::vector<std::string> symbols;
std::string FullMemberName = archPath.str() + "(" + member.getPath().str()
+ ")";
- Module* M =
+ Module* M =
GetBitcodeSymbols(data, fSize, FullMemberName, Context, symbols, ErrMsg);
// If the bitcode parsed successfully
@@ -421,7 +421,7 @@
}
const char* base = arch->getBufferStart();
- // Open another temporary file in order to avoid invalidating the
+ // Open another temporary file in order to avoid invalidating the
// mmapped data
if (FinalFilePath.createTemporaryFileOnDisk(ErrMsg))
return true;
@@ -462,17 +462,17 @@
// Close up shop
FinalFile.close();
} // free arch.
-
+
// Move the final file over top of TmpArchive
if (FinalFilePath.renamePathOnDisk(TmpArchive, ErrMsg))
return true;
}
-
+
// Before we replace the actual archive, we need to forget all the
// members, since they point to data in that old archive. We need to do
// this because we cannot replace an open file on Windows.
cleanUpMemory();
-
+
if (TmpArchive.renamePathOnDisk(archPath, ErrMsg))
return true;
Modified: llvm/trunk/tools/llvm-ar/llvm-ar.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-ar/llvm-ar.cpp?rev=123152&r1=123151&r2=123152&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-ar/llvm-ar.cpp (original)
+++ llvm/trunk/tools/llvm-ar/llvm-ar.cpp Sun Jan 9 20:34:40 2011
@@ -274,7 +274,7 @@
// finds with all the files in that directory (recursively). It uses the
// sys::Path::getDirectoryContent method to perform the actual directory scans.
bool
-recurseDirectories(const sys::Path& path,
+recurseDirectories(const sys::Path& path,
std::set<sys::Path>& result, std::string* ErrMsg) {
result.clear();
if (RecurseDirectories) {
@@ -380,7 +380,7 @@
// putMode - utility function for printing out the file mode when the 't'
// operation is in verbose mode.
-void
+void
printMode(unsigned mode) {
if (mode & 004)
outs() << "r";
@@ -400,7 +400,7 @@
// the file names of each of the members. However, if verbose mode is requested
// ('v' modifier) then the file type, permission mode, user, group, size, and
// modification time are also printed.
-bool
+bool
doDisplayTable(std::string* ErrMsg) {
if (buildPaths(false, ErrMsg))
return true;
@@ -438,7 +438,7 @@
// doExtract - Implement the 'x' operation. This function extracts files back to
// the file system, making sure to uncompress any that were compressed
-bool
+bool
doExtract(std::string* ErrMsg) {
if (buildPaths(false, ErrMsg))
return true;
@@ -451,7 +451,7 @@
if (I->hasPath()) {
sys::Path dirs(I->getPath());
dirs.eraseComponent();
- if (dirs.createDirectoryOnDisk(/*create_parents=*/true, ErrMsg))
+ if (dirs.createDirectoryOnDisk(/*create_parents=*/true, ErrMsg))
return true;
}
@@ -481,11 +481,11 @@
// members from the archive. Note that if the count is specified, there should
// be no more than one path in the Paths list or else this algorithm breaks.
// That check is enforced in parseCommandLine (above).
-bool
+bool
doDelete(std::string* ErrMsg) {
if (buildPaths(false, ErrMsg))
return true;
- if (Paths.empty())
+ if (Paths.empty())
return false;
unsigned countDown = Count;
for (Archive::iterator I = TheArchive->begin(), E = TheArchive->end();
@@ -514,9 +514,9 @@
// order of the archive members so that when the archive is written the move
// of the members is accomplished. Note the use of the RelPos variable to
// determine where the items should be moved to.
-bool
+bool
doMove(std::string* ErrMsg) {
- if (buildPaths(false, ErrMsg))
+ if (buildPaths(false, ErrMsg))
return true;
// By default and convention the place to move members to is the end of the
@@ -567,12 +567,12 @@
// doQuickAppend - Implements the 'q' operation. This function just
// indiscriminantly adds the members to the archive and rebuilds it.
-bool
+bool
doQuickAppend(std::string* ErrMsg) {
// Get the list of paths to append.
if (buildPaths(true, ErrMsg))
return true;
- if (Paths.empty())
+ if (Paths.empty())
return false;
// Append them quickly.
@@ -592,13 +592,13 @@
// doReplaceOrInsert - Implements the 'r' operation. This function will replace
// any existing files or insert new ones into the archive.
-bool
+bool
doReplaceOrInsert(std::string* ErrMsg) {
// Build the list of files to be added/replaced.
if (buildPaths(true, ErrMsg))
return true;
- if (Paths.empty())
+ if (Paths.empty())
return false;
// Keep track of the paths that remain to be inserted.
@@ -638,7 +638,7 @@
if (found != remaining.end()) {
std::string Err;
- sys::PathWithStatus PwS(*found);
+ sys::PathWithStatus PwS(*found);
const sys::FileStatus *si = PwS.getFileStatus(false, &Err);
if (!si)
return true;
More information about the llvm-commits
mailing list