aboutsummaryrefslogtreecommitdiff
path: root/lib/Archive
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2007-07-05 17:07:56 +0000
committerGabor Greif <ggreif@gmail.com>2007-07-05 17:07:56 +0000
commita99be51bf5cdac1438069d4b01766c47704961c8 (patch)
treec743819ee5ce71fc3aa76ed445ca89201b4daf4a /lib/Archive
parentf8ad9552215503f7573b5049567ed59c37cc9636 (diff)
Here is the bulk of the sanitizing.
Almost all occurrences of "bytecode" in the sources have been eliminated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37913 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Archive')
-rw-r--r--lib/Archive/Archive.cpp16
-rw-r--r--lib/Archive/ArchiveInternals.h20
-rw-r--r--lib/Archive/ArchiveReader.cpp22
-rw-r--r--lib/Archive/ArchiveWriter.cpp12
4 files changed, 35 insertions, 35 deletions
diff --git a/lib/Archive/Archive.cpp b/lib/Archive/Archive.cpp
index 6fabc5c862..d0c64097a2 100644
--- a/lib/Archive/Archive.cpp
+++ b/lib/Archive/Archive.cpp
@@ -210,10 +210,10 @@ static void getSymbols(Module*M, std::vector<std::string>& symbols) {
symbols.push_back(FI->getName());
}
-// Get just the externally visible defined symbols from the bytecode
-bool llvm::GetBytecodeSymbols(const sys::Path& fName,
- std::vector<std::string>& symbols,
- std::string* ErrMsg) {
+// Get just the externally visible defined symbols from the bitcode
+bool llvm::GetBitcodeSymbols(const sys::Path& fName,
+ std::vector<std::string>& symbols,
+ std::string* ErrMsg) {
std::auto_ptr<MemoryBuffer> Buffer(
MemoryBuffer::getFileOrSTDIN(&fName.toString()[0],
fName.toString().size()));
@@ -242,10 +242,10 @@ bool llvm::GetBytecodeSymbols(const sys::Path& fName,
}
ModuleProvider*
-llvm::GetBytecodeSymbols(const unsigned char *BufPtr, unsigned Length,
- const std::string& ModuleID,
- std::vector<std::string>& symbols,
- std::string* ErrMsg) {
+llvm::GetBitcodeSymbols(const unsigned char *BufPtr, unsigned Length,
+ const std::string& ModuleID,
+ std::vector<std::string>& symbols,
+ std::string* ErrMsg) {
// Get the module provider
MemoryBuffer *Buffer =MemoryBuffer::getNewMemBuffer(Length, ModuleID.c_str());
memcpy((char*)Buffer->getBufferStart(), BufPtr, Length);
diff --git a/lib/Archive/ArchiveInternals.h b/lib/Archive/ArchiveInternals.h
index 4642f7a30a..8648bbbf29 100644
--- a/lib/Archive/ArchiveInternals.h
+++ b/lib/Archive/ArchiveInternals.h
@@ -1,4 +1,4 @@
-//===-- lib/Bytecode/ArchiveInternals.h -------------------------*- C++ -*-===//
+//===-- lib/Archive/ArchiveInternals.h -------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -11,8 +11,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LIB_BYTECODE_ARCHIVEINTERNALS_H
-#define LIB_BYTECODE_ARCHIVEINTERNALS_H
+#ifndef LIB_ARCHIVE_ARCHIVEINTERNALS_H
+#define LIB_ARCHIVE_ARCHIVEINTERNALS_H
#include "llvm/Bitcode/Archive.h"
#include "llvm/System/TimeValue.h"
@@ -29,7 +29,7 @@
namespace llvm {
- /// The ArchiveMemberHeader structure is used internally for bytecode
+ /// The ArchiveMemberHeader structure is used internally for bitcode
/// archives.
/// The header precedes each file member in the archive. This structure is
/// defined using character arrays for direct and correct interpretation
@@ -67,15 +67,15 @@ namespace llvm {
}
};
- // Get just the externally visible defined symbols from the bytecode
- bool GetBytecodeSymbols(const sys::Path& fName,
+ // Get just the externally visible defined symbols from the bitcode
+ bool GetBitcodeSymbols(const sys::Path& fName,
std::vector<std::string>& symbols,
std::string* ErrMsg);
- ModuleProvider* GetBytecodeSymbols(const unsigned char*Buffer,unsigned Length,
- const std::string& ModuleID,
- std::vector<std::string>& symbols,
- std::string* ErrMsg);
+ ModuleProvider* GetBitcodeSymbols(const unsigned char*Buffer,unsigned Length,
+ const std::string& ModuleID,
+ std::vector<std::string>& symbols,
+ std::string* ErrMsg);
}
#endif
diff --git a/lib/Archive/ArchiveReader.cpp b/lib/Archive/ArchiveReader.cpp
index c38389e2d7..93eaac18f6 100644
--- a/lib/Archive/ArchiveReader.cpp
+++ b/lib/Archive/ArchiveReader.cpp
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
//
-// Builds up standard unix archive files (.a) containing LLVM bytecode.
+// Builds up standard unix archive files (.a) containing LLVM bitcode.
//
//===----------------------------------------------------------------------===//
@@ -109,7 +109,7 @@ Archive::parseMemberHeader(const char*& At, const char* End, std::string* error)
// it will accept them. If the name starts with #1/ and the remainder is
// digits, then those digits specify the length of the name that is
// stored immediately following the header. The special name
- // __LLVM_SYM_TAB__ identifies the symbol table for LLVM bytecode.
+ // __LLVM_SYM_TAB__ identifies the symbol table for LLVM bitcode.
// Anything else is a regular, short filename that is terminated with
// a '/' and blanks.
@@ -344,7 +344,7 @@ Archive::OpenAndLoad(const sys::Path& file, std::string* ErrorMessage)
return result.release();
}
-// Get all the bytecode modules from the archive
+// Get all the bitcode modules from the archive
bool
Archive::getAllModules(std::vector<Module*>& Modules, std::string* ErrMessage) {
@@ -487,7 +487,7 @@ Archive::findModuleDefiningSymbol(const std::string& symbol,
if (!mbr)
return 0;
- // Now, load the bytecode module to get the ModuleProvider
+ // Now, load the bitcode module to get the ModuleProvider
std::string FullMemberName = archPath.toString() + "(" +
mbr->getPath().toString() + ")";
MemoryBuffer *Buffer =MemoryBuffer::getNewMemBuffer(mbr->getSize(),
@@ -541,8 +541,8 @@ Archive::findModulesDefiningSymbols(std::set<std::string>& symbols,
std::string FullMemberName = archPath.toString() + "(" +
mbr->getPath().toString() + ")";
ModuleProvider* MP =
- GetBytecodeSymbols((const unsigned char*)At, mbr->getSize(),
- FullMemberName, symbols, error);
+ GetBitcodeSymbols((const unsigned char*)At, mbr->getSize(),
+ FullMemberName, symbols, error);
if (MP) {
// Insert the module's symbols into the symbol table
@@ -555,7 +555,7 @@ Archive::findModulesDefiningSymbols(std::set<std::string>& symbols,
modules.insert(std::make_pair(offset, std::make_pair(MP, mbr)));
} else {
if (error)
- *error = "Can't parse bytecode member: " +
+ *error = "Can't parse bitcode member: " +
mbr->getPath().toString() + ": " + *error;
delete mbr;
return false;
@@ -591,7 +591,7 @@ Archive::findModulesDefiningSymbols(std::set<std::string>& symbols,
return true;
}
-bool Archive::isBytecodeArchive() {
+bool Archive::isBitcodeArchive() {
// Make sure the symTab has been loaded. In most cases this should have been
// done when the archive was constructed, but still, this is just in case.
if (!symTab.size())
@@ -602,14 +602,14 @@ bool Archive::isBytecodeArchive() {
// if it has a size
if (symTab.size()) return true;
- //We still can't be sure it isn't a bytecode archive
+ // We still can't be sure it isn't a bitcode archive
if (!loadArchive(0))
return false;
std::vector<Module *> Modules;
std::string ErrorMessage;
- // Scan the archive, trying to load a bytecode member. We only load one to
+ // Scan the archive, trying to load a bitcode member. We only load one to
// see if this works.
for (iterator I = begin(), E = end(); I != E; ++I) {
if (!I->isBytecode() && !I->isCompressedBytecode())
@@ -624,7 +624,7 @@ bool Archive::isBytecodeArchive() {
Module *M = ParseBitcodeFile(Buffer);
delete Buffer;
if (!M)
- return false; // Couldn't parse bytecode, not a bytecode archive.
+ return false; // Couldn't parse bitcode, not a bitcode archive.
delete M;
return true;
}
diff --git a/lib/Archive/ArchiveWriter.cpp b/lib/Archive/ArchiveWriter.cpp
index 051d31fce9..d67937ea11 100644
--- a/lib/Archive/ArchiveWriter.cpp
+++ b/lib/Archive/ArchiveWriter.cpp
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
//
-// Builds up an LLVM archive file (.a) containing LLVM bytecode.
+// Builds up an LLVM archive file (.a) containing LLVM bitcode.
//
//===----------------------------------------------------------------------===//
@@ -222,7 +222,7 @@ Archive::writeMember(
}
// Now that we have the data in memory, update the
- // symbol table if its a bytecode file.
+ // symbol table if its a bitcode file.
if (CreateSymbolTable &&
(member.isBytecode() || member.isCompressedBytecode())) {
std::vector<std::string> symbols;
@@ -230,10 +230,10 @@ Archive::writeMember(
member.getPath().toString()
+ ")";
ModuleProvider* MP =
- GetBytecodeSymbols((const unsigned char*)data,fSize,
- FullMemberName, symbols, ErrMsg);
+ GetBitcodeSymbols((const unsigned char*)data,fSize,
+ FullMemberName, symbols, ErrMsg);
- // If the bytecode parsed successfully
+ // If the bitcode parsed successfully
if ( MP ) {
for (std::vector<std::string>::iterator SI = symbols.begin(),
SE = symbols.end(); SI != SE; ++SI) {
@@ -255,7 +255,7 @@ Archive::writeMember(
delete mFile;
}
if (ErrMsg)
- *ErrMsg = "Can't parse bytecode member: " + member.getPath().toString()
+ *ErrMsg = "Can't parse bitcode member: " + member.getPath().toString()
+ ": " + *ErrMsg;
return true;
}