aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Archive
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2011-01-10 02:34:40 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2011-01-10 02:34:40 +0000
commit83a113b77c1b57f14175db9d401b949ed64e77ad (patch)
tree09b781606a96324096df76baaf929266dc43b2c2 /lib/Archive
parent54453f2978c76b3aa71be7bb4e9657c8539f8648 (diff)
downloadexternal_llvm-83a113b77c1b57f14175db9d401b949ed64e77ad.zip
external_llvm-83a113b77c1b57f14175db9d401b949ed64e77ad.tar.gz
external_llvm-83a113b77c1b57f14175db9d401b949ed64e77ad.tar.bz2
Fix Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123152 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Archive')
-rw-r--r--lib/Archive/Archive.cpp22
-rw-r--r--lib/Archive/ArchiveWriter.cpp12
2 files changed, 17 insertions, 17 deletions
diff --git a/lib/Archive/Archive.cpp b/lib/Archive/Archive.cpp
index 8aa5d5b..3ee3cb2 100644
--- a/lib/Archive/Archive.cpp
+++ b/lib/Archive/Archive.cpp
@@ -166,19 +166,19 @@ void Archive::cleanUpMemory() {
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 @@ static void getSymbols(Module*M, std::vector<std::string>& symbols) {
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 @@ bool llvm::GetBitcodeSymbols(const sys::Path& fName,
+ 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 @@ llvm::GetBitcodeSymbols(const char *BufPtr, unsigned Length,
// 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;
diff --git a/lib/Archive/ArchiveWriter.cpp b/lib/Archive/ArchiveWriter.cpp
index 7499a22..07a9aaf 100644
--- a/lib/Archive/ArchiveWriter.cpp
+++ b/lib/Archive/ArchiveWriter.cpp
@@ -155,7 +155,7 @@ Archive::fillHeader(const ArchiveMember &mbr, ArchiveMemberHeader& hdr,
// 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 @@ Archive::writeMember(
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 @@ Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress,
}
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 @@ Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress,
// 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;