From a99be51bf5cdac1438069d4b01766c47704961c8 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Thu, 5 Jul 2007 17:07:56 +0000 Subject: 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 --- examples/ModuleMaker/ModuleMaker.cpp | 4 +- include/llvm/AbstractTypeUser.h | 2 +- include/llvm/Analysis/ConstantsScanner.h | 2 +- include/llvm/Bitcode/Archive.h | 22 +++++------ include/llvm/GlobalValue.h | 4 +- include/llvm/Linker.h | 14 +++---- include/llvm/Support/SystemUtils.h | 4 +- include/llvm/System/Path.h | 6 +-- include/llvm/Type.h | 4 +- lib/Archive/Archive.cpp | 16 ++++---- lib/Archive/ArchiveInternals.h | 20 +++++----- lib/Archive/ArchiveReader.cpp | 22 +++++------ lib/Archive/ArchiveWriter.cpp | 12 +++--- lib/Bitcode/Reader/BitcodeReader.cpp | 6 +-- lib/CodeGen/ELFWriter.h | 2 +- lib/ExecutionEngine/JIT/JIT.cpp | 6 +-- lib/ExecutionEngine/JIT/JITEmitter.cpp | 4 +- lib/Linker/LinkArchives.cpp | 2 +- lib/Linker/LinkItems.cpp | 16 ++++---- lib/Linker/Linker.cpp | 6 +-- lib/Support/SystemUtils.cpp | 8 ++-- lib/System/Unix/Path.inc | 2 +- lib/Target/ARM/ARMISelLowering.cpp | 2 +- lib/Target/PowerPC/PPCCodeEmitter.cpp | 2 +- lib/Target/PowerPC/PPCSubtarget.cpp | 2 +- lib/Target/X86/X86Subtarget.cpp | 2 +- lib/VMCore/PassManager.cpp | 2 +- tools/llc/llc.cpp | 6 +-- tools/lli/lli.cpp | 4 +- tools/llvm-ar/llvm-ar.cpp | 14 +++---- tools/llvm-as/llvm-as.cpp | 2 +- tools/llvm-db/Commands.cpp | 2 +- tools/llvm-dis/llvm-dis.cpp | 8 ++-- tools/llvm-extract/llvm-extract.cpp | 4 +- tools/llvm-ld/llvm-ld.cpp | 66 ++++++++++++++++---------------- tools/llvm-link/llvm-link.cpp | 10 ++--- tools/llvm-nm/llvm-nm.cpp | 4 +- tools/llvm-prof/llvm-prof.cpp | 10 ++--- tools/llvm-ranlib/llvm-ranlib.cpp | 2 +- tools/llvm2cpp/llvm2cpp.cpp | 4 +- tools/llvmc/CompilerDriver.cpp | 22 +++++------ tools/llvmc/CompilerDriver.h | 6 +-- tools/llvmc/ConfigLexer.h | 2 +- tools/llvmc/ConfigLexer.l | 6 +-- tools/llvmc/Configuration.cpp | 10 ++--- tools/llvmc/llvmc.cpp | 2 +- tools/lto/lto-c.cpp | 2 +- tools/lto/lto.cpp | 6 +-- tools/opt/opt.cpp | 10 ++--- 49 files changed, 198 insertions(+), 198 deletions(-) diff --git a/examples/ModuleMaker/ModuleMaker.cpp b/examples/ModuleMaker/ModuleMaker.cpp index ec7398c97f..ed56625eed 100644 --- a/examples/ModuleMaker/ModuleMaker.cpp +++ b/examples/ModuleMaker/ModuleMaker.cpp @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// // // This programs is a simple example that creates an LLVM module "from scratch", -// emitting it as a bytecode file to standard out. This is just to show how +// emitting it as a bitcode file to standard out. This is just to show how // LLVM projects work and to demonstrate some of the LLVM APIs. // //===----------------------------------------------------------------------===// @@ -52,7 +52,7 @@ int main() { // Create the return instruction and add it to the basic block BB->getInstList().push_back(new ReturnInst(Add)); - // Output the bytecode file to stdout + // Output the bitcode file to stdout WriteBitcodeToFile(M, std::cout); // Delete the module and all of its contents. diff --git a/include/llvm/AbstractTypeUser.h b/include/llvm/AbstractTypeUser.h index fe51effc61..2b643ab935 100644 --- a/include/llvm/AbstractTypeUser.h +++ b/include/llvm/AbstractTypeUser.h @@ -41,7 +41,7 @@ class DerivedType; /// /// Classes must implement this interface so that they may be notified when an /// abstract type is resolved. Abstract types may be resolved into more -/// concrete types through: linking, parsing, and bytecode reading. When this +/// concrete types through: linking, parsing, and bitcode reading. When this /// happens, all of the users of the type must be updated to reference the new, /// more concrete type. They are notified through the AbstractTypeUser /// interface. diff --git a/include/llvm/Analysis/ConstantsScanner.h b/include/llvm/Analysis/ConstantsScanner.h index 1f71f3900c..9ea9ed6ce6 100644 --- a/include/llvm/Analysis/ConstantsScanner.h +++ b/include/llvm/Analysis/ConstantsScanner.h @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// // // This class implements an iterator to walk through the constants referenced by -// a method. This is used by the Bytecode & Assembly writers to build constant +// a method. This is used by the Bitcode & Assembly writers to build constant // pools. // //===----------------------------------------------------------------------===// diff --git a/include/llvm/Bitcode/Archive.h b/include/llvm/Bitcode/Archive.h index 26dcf60e1a..eee3922f04 100644 --- a/include/llvm/Bitcode/Archive.h +++ b/include/llvm/Bitcode/Archive.h @@ -14,8 +14,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_BITECODE_ARCHIVE_H -#define LLVM_BITECODE_ARCHIVE_H +#ifndef LLVM_BITCODE_ARCHIVE_H +#define LLVM_BITCODE_ARCHIVE_H #include "llvm/ADT/ilist" #include "llvm/System/Path.h" @@ -377,13 +377,13 @@ class Archive { /// @brief Get the offset to the first "real" file member in the archive. unsigned getFirstFileOffset() { return firstFileOffset; } - /// This method will scan the archive for bytecode modules, interpret them + /// This method will scan the archive for bitcode modules, interpret them /// and return a vector of the instantiated modules in \p Modules. If an /// error occurs, this method will return true. If \p ErrMessage is not null /// and an error occurs, \p *ErrMessage will be set to a string explaining /// the error that occurred. /// @returns true if an error occurred - /// @brief Instantiate all the bytecode modules located in the archive + /// @brief Instantiate all the bitcode modules located in the archive bool getAllModules(std::vector& Modules, std::string* ErrMessage); /// This accessor looks up the \p symbol in the archive's symbol table and @@ -418,13 +418,13 @@ class Archive { ); /// This method determines whether the archive is a properly formed llvm - /// bytecode archive. It first makes sure the symbol table has been loaded + /// bitcode archive. It first makes sure the symbol table has been loaded /// and has a non-zero size. If it does, then it is an archive. If not, - /// then it tries to load all the bytecode modules of the archive. Finally, + /// then it tries to load all the bitcode modules of the archive. Finally, /// it returns whether it was successfull. - /// @returns true if the archive is a proper llvm bytecode archive - /// @brief Determine whether the archive is a proper llvm bytecode archive. - bool isBytecodeArchive(); + /// @returns true if the archive is a proper llvm bitcode archive + /// @brief Determine whether the archive is a proper llvm bitcode archive. + bool isBitcodeArchive(); /// @} /// @name Mutators @@ -433,7 +433,7 @@ class Archive { /// This method is the only way to get the archive written to disk. It /// creates or overwrites the file specified when \p this was created /// or opened. The arguments provide options for writing the archive. If - /// \p CreateSymbolTable is true, the archive is scanned for bytecode files + /// \p CreateSymbolTable is true, the archive is scanned for bitcode files /// and a symbol table of the externally visible function and global /// variable names is created. If \p TruncateNames is true, the names of the /// archive members will have their path component stripped and the file @@ -525,7 +525,7 @@ class Archive { /// @brief Frees all the members and unmaps the archive file. void cleanUpMemory(); - /// This type is used to keep track of bytecode modules loaded from the + /// This type is used to keep track of bitcode modules loaded from the /// symbol table. It maps the file offset to a pair that consists of the /// associated ArchiveMember and the ModuleProvider. /// @brief Module mapping type diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h index d2d9130370..6735cb5007 100644 --- a/include/llvm/GlobalValue.h +++ b/include/llvm/GlobalValue.h @@ -108,12 +108,12 @@ public: void setLinkage(LinkageTypes LT) { Linkage = LT; } LinkageTypes getLinkage() const { return Linkage; } - /// hasNotBeenReadFromBytecode - If a module provider is being used to lazily + /// hasNotBeenReadFromBitcode - If a module provider is being used to lazily /// stream in functions from disk, this method can be used to check to see if /// the function has been read in yet or not. Unless you are working on the /// JIT or something else that streams stuff in lazily, you don't need to /// worry about this. - bool hasNotBeenReadFromBytecode() const { return Linkage == GhostLinkage; } + bool hasNotBeenReadFromBitcode() const { return Linkage == GhostLinkage; } /// Override from Constant class. No GlobalValue's are null values so this /// always returns false. diff --git a/include/llvm/Linker.h b/include/llvm/Linker.h index 66a8483367..cc0372d973 100644 --- a/include/llvm/Linker.h +++ b/include/llvm/Linker.h @@ -28,7 +28,7 @@ class Module; /// In this case the Linker still retains ownership of the Module. If the /// releaseModule() method is used, the ownership of the Module is transferred /// to the caller and the Linker object is only suitable for destruction. -/// The Linker can link Modules from memory, bytecode files, or bytecode +/// 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 @@ -162,10 +162,10 @@ class Linker { ItemList& NativeItems ///< Output list of native files/libs ); - /// This function links the bytecode \p Files into the composite module. + /// This function links the bitcode \p Files into the composite module. /// Note that this does not do any linking of unresolved symbols. The \p /// Files are all completely linked into \p HeadModule regardless of - /// unresolved symbols. This function just loads each bytecode file and + /// unresolved symbols. This function just loads each bitcode file and /// calls LinkInModule on them. /// @returns true if an error occurs, false otherwise /// @see getLastError @@ -174,9 +174,9 @@ class Linker { const std::vector & Files ///< Files to link in ); - /// This function links a single bytecode file, \p File, into the composite + /// This function links a single bitcode file, \p File, into the composite /// module. Note that this does not attempt to resolve symbols. This method - /// just loads the bytecode file and calls LinkInModule on it. If an error + /// just loads the bitcode file and calls LinkInModule on it. If an error /// occurs, the Linker's error string is set. /// @returns true if an error occurs, false otherwise /// @see getLastError @@ -216,7 +216,7 @@ class Linker { bool& is_native ///< Indicates if lib a native library ); - /// This function links one bytecode archive, \p Filename, into the module. + /// This function links one bitcode archive, \p Filename, into the module. /// The archive is searched to resolve outstanding symbols. Any modules in /// the archive that resolve outstanding symbols will be linked in. The /// library is searched repeatedly until no more modules that resolve @@ -271,7 +271,7 @@ class Linker { /// @name Implementation /// @{ private: - /// Read in and parse the bytecode file named by FN and return the + /// Read in and parse the bitcode file named by FN and return the /// Module it contains (wrapped in an auto_ptr), or 0 if an error occurs. std::auto_ptr LoadObject(const sys::Path& FN); diff --git a/include/llvm/Support/SystemUtils.h b/include/llvm/Support/SystemUtils.h index 93432b57bf..6dc5c2727b 100644 --- a/include/llvm/Support/SystemUtils.h +++ b/include/llvm/Support/SystemUtils.h @@ -21,10 +21,10 @@ namespace llvm { /// Determine if the ostream provided is connected to the std::cout and /// displayed or not (to a console window). If so, generate a warning message -/// advising against display of bytecode and return true. Otherwise just return +/// advising against display of bitcode and return true. Otherwise just return /// false /// @brief Check for output written to a console -bool CheckBytecodeOutputToConsole( +bool CheckBitcodeOutputToConsole( std::ostream* stream_to_check, ///< The stream to be checked bool print_warning = true ///< Control whether warnings are printed ); diff --git a/include/llvm/System/Path.h b/include/llvm/System/Path.h index 97876a3f81..537a5af5a3 100644 --- a/include/llvm/System/Path.h +++ b/include/llvm/System/Path.h @@ -112,15 +112,15 @@ namespace sys { /// @brief Construct a path to the system library directory static void GetSystemLibraryPaths(std::vector& Paths); - /// Construct a vector of sys::Path that contains the "standard" bytecode + /// Construct a vector of sys::Path that contains the "standard" bitcode /// library paths suitable for linking into an llvm program. This function /// *must* return the value of LLVM_LIB_SEARCH_PATH as well as the value /// of LLVM_LIBDIR. It also must provide the System library paths as /// returned by GetSystemLibraryPaths. /// @see GetSystemLibraryPaths - /// @brief Construct a list of directories in which bytecode could be + /// @brief Construct a list of directories in which bitcode could be /// found. - static void GetBytecodeLibraryPaths(std::vector& Paths); + static void GetBitcodeLibraryPaths(std::vector& Paths); /// Find the path to a library using its short name. Use the system /// dependent library paths to locate the library. diff --git a/include/llvm/Type.h b/include/llvm/Type.h index d19bec2712..cf1c64fc9d 100644 --- a/include/llvm/Type.h +++ b/include/llvm/Type.h @@ -52,7 +52,7 @@ class TypeMapBase; /// /// Opaque types are also kinda weird and scary and different because they have /// to keep a list of uses of the type. When, through linking, parsing, or -/// bytecode reading, they become resolved, they need to find and update all +/// bitcode reading, they become resolved, they need to find and update all /// users of the unknown type, causing them to reference a new, more concrete /// type. Opaque types are deleted when their use list dwindles to zero users. /// @@ -77,7 +77,7 @@ public: IntegerTyID, ///< 4: Arbitrary bit width integers FunctionTyID, ///< 5: Functions StructTyID, ///< 6: Structures - PackedStructTyID,///< 7: Packed Structure. This is for bytecode only + PackedStructTyID,///< 7: Packed Structure. This is for bitcode only ArrayTyID, ///< 8: Arrays PointerTyID, ///< 9: Pointers OpaqueTyID, ///< 10: Opaque: type with unknown structure 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& 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& symbols, - std::string* ErrMsg) { +// Get just the externally visible defined symbols from the bitcode +bool llvm::GetBitcodeSymbols(const sys::Path& fName, + std::vector& symbols, + std::string* ErrMsg) { std::auto_ptr 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& symbols, - std::string* ErrMsg) { +llvm::GetBitcodeSymbols(const unsigned char *BufPtr, unsigned Length, + const std::string& ModuleID, + std::vector& 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& symbols, std::string* ErrMsg); - ModuleProvider* GetBytecodeSymbols(const unsigned char*Buffer,unsigned Length, - const std::string& ModuleID, - std::vector& symbols, - std::string* ErrMsg); + ModuleProvider* GetBitcodeSymbols(const unsigned char*Buffer,unsigned Length, + const std::string& ModuleID, + std::vector& 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& 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& 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& 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& 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 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 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::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; } diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index 7408580b23..b040df3383 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/lib/Bitcode/Reader/BitcodeReader.cpp @@ -1564,7 +1564,7 @@ bool BitcodeReader::ParseFunctionBody(Function *F) { bool BitcodeReader::materializeFunction(Function *F, std::string *ErrInfo) { // If it already is material, ignore the request. - if (!F->hasNotBeenReadFromBytecode()) return false; + if (!F->hasNotBeenReadFromBitcode()) return false; DenseMap >::iterator DFII = DeferredFunctionInfo.find(F); @@ -1585,7 +1585,7 @@ bool BitcodeReader::materializeFunction(Function *F, std::string *ErrInfo) { void BitcodeReader::dematerializeFunction(Function *F) { // If this function isn't materialized, or if it is a proto, this is a noop. - if (F->hasNotBeenReadFromBytecode() || F->isDeclaration()) + if (F->hasNotBeenReadFromBitcode() || F->isDeclaration()) return; assert(DeferredFunctionInfo.count(F) && "No info to read function later?"); @@ -1601,7 +1601,7 @@ Module *BitcodeReader::materializeModule(std::string *ErrInfo) { DeferredFunctionInfo.begin(), E = DeferredFunctionInfo.end(); I != E; ++I) { Function *F = I->first; - if (F->hasNotBeenReadFromBytecode() && + if (F->hasNotBeenReadFromBitcode() && materializeFunction(F, ErrInfo)) return 0; } diff --git a/lib/CodeGen/ELFWriter.h b/lib/CodeGen/ELFWriter.h index 04cd1773c1..f27d78f4f0 100644 --- a/lib/CodeGen/ELFWriter.h +++ b/lib/CodeGen/ELFWriter.h @@ -90,7 +90,7 @@ namespace llvm { private: // The buffer we accumulate the file header into. Note that this should be - // changed into something much more efficient later (and the bytecode writer + // changed into something much more efficient later (and the bitcode writer // as well!). DataBuffer FileHeader; diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp index cb698c35d2..603f8ec14a 100644 --- a/lib/ExecutionEngine/JIT/JIT.cpp +++ b/lib/ExecutionEngine/JIT/JIT.cpp @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// // // This tool implements a just-in-time compiler for LLVM, allowing direct -// execution of LLVM bytecode in an efficient manner. +// execution of LLVM bitcode in an efficient manner. // //===----------------------------------------------------------------------===// @@ -258,7 +258,7 @@ void *JIT::getPointerToFunction(Function *F) { return Addr; // Check if function already code gen'd // Make sure we read in the function if it exists in this Module. - if (F->hasNotBeenReadFromBytecode()) { + if (F->hasNotBeenReadFromBitcode()) { // Determine the module provider this function is provided by. Module *M = F->getParent(); ModuleProvider *MP = 0; @@ -273,7 +273,7 @@ void *JIT::getPointerToFunction(Function *F) { std::string ErrorMsg; if (MP->materializeFunction(F, &ErrorMsg)) { cerr << "Error reading function '" << F->getName() - << "' from bytecode file: " << ErrorMsg << "\n"; + << "' from bitcode file: " << ErrorMsg << "\n"; abort(); } } diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp index fc746d6df8..840af5997a 100644 --- a/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -543,7 +543,7 @@ void *JITResolver::getFunctionStub(Function *F) { // Call the lazy resolver function unless we already KNOW it is an external // function, in which case we just skip the lazy resolution step. void *Actual = (void*)(intptr_t)LazyResolverFn; - if (F->isDeclaration() && !F->hasNotBeenReadFromBytecode()) + if (F->isDeclaration() && !F->hasNotBeenReadFromBitcode()) Actual = TheJIT->getPointerToFunction(F); // Otherwise, codegen a new stub. For now, the stub will call the lazy @@ -762,7 +762,7 @@ void *JITEmitter::getPointerToGlobal(GlobalValue *V, void *Reference, void *ResultPtr = TheJIT->getPointerToGlobalIfAvailable(F); if (ResultPtr) return ResultPtr; - if (F->isDeclaration() && !F->hasNotBeenReadFromBytecode()) { + if (F->isDeclaration() && !F->hasNotBeenReadFromBitcode()) { // If this is an external function pointer, we can force the JIT to // 'compile' it, which really just adds it to the map. if (DoesntNeedStub) diff --git a/lib/Linker/LinkArchives.cpp b/lib/Linker/LinkArchives.cpp index 416b2857db..381d0e7e5a 100644 --- a/lib/Linker/LinkArchives.cpp +++ b/lib/Linker/LinkArchives.cpp @@ -117,7 +117,7 @@ Linker::LinkInArchive(const sys::Path &Filename, bool &is_native) { if (!arch) return error("Cannot read archive '" + Filename.toString() + "': " + ErrMsg); - if (!arch->isBytecodeArchive()) { + if (!arch->isBitcodeArchive()) { is_native = true; return false; } diff --git a/lib/Linker/LinkItems.cpp b/lib/Linker/LinkItems.cpp index 50efe46bd1..e66fa5b6e6 100644 --- a/lib/Linker/LinkItems.cpp +++ b/lib/Linker/LinkItems.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// // -// This file contains routines to handle linking together LLVM bytecode files, +// This file contains routines to handle linking together LLVM bitcode files, // and to handle annoying things like static libraries. // //===----------------------------------------------------------------------===// @@ -20,7 +20,7 @@ using namespace llvm; // LinkItems - This function is the main entry point into linking. It takes a // list of LinkItem which indicates the order the files should be linked and // how each file should be treated (plain file or with library search). The -// function only links bytecode and produces a result list of items that are +// function only links bitcode and produces a result list of items that are // native objects. bool Linker::LinkInItems(const ItemList& Items, ItemList& NativeItems) { @@ -109,7 +109,7 @@ bool Linker::LinkInLibrary(const std::string& Lib, bool& is_native) { } /// LinkLibraries - takes the specified library files and links them into the -/// main bytecode object file. +/// main bitcode object file. /// /// Inputs: /// Libraries - The list of libraries to link into the module. @@ -140,11 +140,11 @@ bool Linker::LinkInLibraries(const std::vector &Libraries) { return false; } -/// LinkInFile - opens a bytecode file and links in all objects which +/// LinkInFile - opens a bitcode file and links in all objects which /// provide symbols that are currently undefined. /// /// Inputs: -/// File - The pathname of the bytecode file. +/// File - The pathname of the bitcode file. /// /// Outputs: /// ErrorMessage - A C++ string detailing what error occurred, if any. @@ -179,7 +179,7 @@ bool Linker::LinkInFile(const sys::Path &File, bool &is_native) { case sys::Bitcode_FileType: case sys::Bytecode_FileType: case sys::CompressedBytecode_FileType: { - verbose("Linking bytecode file '" + File.toString() + "'"); + verbose("Linking bitcode file '" + File.toString() + "'"); std::auto_ptr M(LoadObject(File)); if (M.get() == 0) return error("Cannot load file '" + File.toString() + "'" + Error); @@ -208,9 +208,9 @@ bool Linker::LinkInFile(const sys::Path &File, bool &is_native) { /// or relative pathname, or as a file somewhere in LLVM_LIB_SEARCH_PATH. /// /// Inputs: -/// Files - A vector of sys::Path indicating the LLVM bytecode filenames +/// Files - A vector of sys::Path indicating the LLVM bitcode filenames /// to be linked. The names can refer to a mixture of pure LLVM -/// bytecode files and archive (ar) formatted files. +/// bitcode files and archive (ar) formatted files. /// /// Return value: /// FALSE - No errors. diff --git a/lib/Linker/Linker.cpp b/lib/Linker/Linker.cpp index 077bcd7ba6..4604305b6d 100644 --- a/lib/Linker/Linker.cpp +++ b/lib/Linker/Linker.cpp @@ -80,7 +80,7 @@ Linker::addPaths(const std::vector& paths) { void Linker::addSystemPaths() { - sys::Path::GetBytecodeLibraryPaths(LibPaths); + sys::Path::GetBitcodeLibraryPaths(LibPaths); LibPaths.insert(LibPaths.begin(),sys::Path("./")); } @@ -94,7 +94,7 @@ Linker::releaseModule() { return result; } -// LoadObject - Read in and parse the bytecode file named by FN and return the +// LoadObject - Read in and parse the bitcode file named by FN and return the // module it contains (wrapped in an auto_ptr), or auto_ptr() and set // Error if an error occurs. std::auto_ptr @@ -112,7 +112,7 @@ Linker::LoadObject(const sys::Path &FN) { if (Result) return std::auto_ptr(Result); - Error = "Bytecode file '" + FN.toString() + "' could not be loaded"; + Error = "Bitcode file '" + FN.toString() + "' could not be loaded"; if (ParseErrorMessage.size()) Error += ": " + ParseErrorMessage; return std::auto_ptr(); diff --git a/lib/Support/SystemUtils.cpp b/lib/Support/SystemUtils.cpp index 30b9f8d43d..afa0d7e961 100644 --- a/lib/Support/SystemUtils.cpp +++ b/lib/Support/SystemUtils.cpp @@ -19,14 +19,14 @@ #include using namespace llvm; -bool llvm::CheckBytecodeOutputToConsole(std::ostream* stream_to_check, - bool print_warning) { +bool llvm::CheckBitcodeOutputToConsole(std::ostream* stream_to_check, + bool print_warning) { if (stream_to_check == cout.stream() && sys::Process::StandardOutIsDisplayed()) { if (print_warning) { - cerr << "WARNING: You're attempting to print out a bytecode file.\n" + cerr << "WARNING: You're attempting to print out a bitcode file.\n" << "This is inadvisable as it may cause display problems. If\n" - << "you REALLY want to taste LLVM bytecode first-hand, you\n" + << "you REALLY want to taste LLVM bitcode first-hand, you\n" << "can force output with the `-f' option.\n\n"; } return true; diff --git a/lib/System/Unix/Path.inc b/lib/System/Unix/Path.inc index db95e3c216..e4916baf28 100644 --- a/lib/System/Unix/Path.inc +++ b/lib/System/Unix/Path.inc @@ -218,7 +218,7 @@ Path::GetSystemLibraryPaths(std::vector& Paths) { } void -Path::GetBytecodeLibraryPaths(std::vector& Paths) { +Path::GetBitcodeLibraryPaths(std::vector& Paths) { char * env_var = getenv("LLVM_LIB_SEARCH_PATH"); if (env_var != 0) { getPathList(env_var,Paths); diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index 6f67d66e67..6f63fbdcb3 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/lib/Target/ARM/ARMISelLowering.cpp @@ -824,7 +824,7 @@ SDOperand ARMTargetLowering::LowerGlobalAddressELF(SDOperand Op, static bool GVIsIndirectSymbol(GlobalValue *GV, Reloc::Model RelocM) { return RelocM != Reloc::Static && (GV->hasWeakLinkage() || GV->hasLinkOnceLinkage() || - (GV->isDeclaration() && !GV->hasNotBeenReadFromBytecode())); + (GV->isDeclaration() && !GV->hasNotBeenReadFromBitcode())); } SDOperand ARMTargetLowering::LowerGlobalAddressDarwin(SDOperand Op, diff --git a/lib/Target/PowerPC/PPCCodeEmitter.cpp b/lib/Target/PowerPC/PPCCodeEmitter.cpp index 446e0310fa..5dceffdb68 100644 --- a/lib/Target/PowerPC/PPCCodeEmitter.cpp +++ b/lib/Target/PowerPC/PPCCodeEmitter.cpp @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// // // This file defines the PowerPC 32-bit CodeEmitter and associated machinery to -// JIT-compile bytecode to native PowerPC. +// JIT-compile bitcode to native PowerPC. // //===----------------------------------------------------------------------===// diff --git a/lib/Target/PowerPC/PPCSubtarget.cpp b/lib/Target/PowerPC/PPCSubtarget.cpp index 62f8995bb8..4419d200b9 100644 --- a/lib/Target/PowerPC/PPCSubtarget.cpp +++ b/lib/Target/PowerPC/PPCSubtarget.cpp @@ -137,5 +137,5 @@ bool PPCSubtarget::hasLazyResolverStub(const GlobalValue *GV) const { return false; return GV->hasWeakLinkage() || GV->hasLinkOnceLinkage() || - (GV->isDeclaration() && !GV->hasNotBeenReadFromBytecode()); + (GV->isDeclaration() && !GV->hasNotBeenReadFromBitcode()); } diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp index 124c97ac70..1a75e04511 100644 --- a/lib/Target/X86/X86Subtarget.cpp +++ b/lib/Target/X86/X86Subtarget.cpp @@ -40,7 +40,7 @@ bool X86Subtarget::GVRequiresExtraLoad(const GlobalValue* GV, if (isTargetDarwin()) { return (!isDirectCall && (GV->hasWeakLinkage() || GV->hasLinkOnceLinkage() || - (GV->isDeclaration() && !GV->hasNotBeenReadFromBytecode()))); + (GV->isDeclaration() && !GV->hasNotBeenReadFromBitcode()))); } else if (TM.getRelocationModel() == Reloc::PIC_ && isPICStyleGOT()) { // Extra load is needed for all non-statics. return (!isDirectCall && diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index f257a07efb..23e45c0b95 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -1037,7 +1037,7 @@ void FunctionPassManager::add(Pass *P) { bool FunctionPassManager::run(Function &F) { std::string errstr; if (MP->materializeFunction(&F, &errstr)) { - cerr << "Error reading bytecode file: " << errstr << "\n"; + cerr << "Error reading bitcode file: " << errstr << "\n"; abort(); } return FPM->run(F); diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index 8797c58ce8..b53f59b41c 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -9,7 +9,7 @@ // // This is the llc code generator driver. It provides a convenient // command-line interface for generating native assembly-language code -// or C code, given LLVM bytecode. +// or C code, given LLVM bitcode. // //===----------------------------------------------------------------------===// @@ -44,7 +44,7 @@ using namespace llvm; // and back-end code generation options are specified with the target machine. // static cl::opt -InputFilename(cl::Positional, cl::desc(""), cl::init("-")); +InputFilename(cl::Positional, cl::desc(""), cl::init("-")); static cl::opt OutputFilename("o", cl::desc("Output filename"), cl::value_desc("filename")); @@ -184,7 +184,7 @@ int main(int argc, char **argv) { if (Buffer.get()) M.reset(ParseBitcodeFile(Buffer.get(), &ErrorMessage)); if (M.get() == 0) { - std::cerr << argv[0] << ": bytecode didn't read correctly.\n"; + std::cerr << argv[0] << ": bitcode didn't read correctly.\n"; std::cerr << "Reason: " << ErrorMessage << "\n"; return 1; } diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp index fdb5f4aa39..3ce28077ae 100644 --- a/tools/lli/lli.cpp +++ b/tools/lli/lli.cpp @@ -33,7 +33,7 @@ using namespace llvm; namespace { cl::opt - InputFile(cl::desc(""), cl::Positional, cl::init("-")); + InputFile(cl::desc(""), cl::Positional, cl::init("-")); cl::list InputArgv(cl::ConsumeAfter, cl::desc("...")); @@ -74,7 +74,7 @@ int main(int argc, char **argv, char * const *envp) { if (DisableCoreFiles) sys::Process::PreventCoreFiles(); - // Load the bytecode... + // Load the bitcode... std::string ErrorMsg; ModuleProvider *MP = 0; if (MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(InputFile,&ErrorMsg)){ diff --git a/tools/llvm-ar/llvm-ar.cpp b/tools/llvm-ar/llvm-ar.cpp index d0601c66c1..2cd16e361e 100644 --- a/tools/llvm-ar/llvm-ar.cpp +++ b/tools/llvm-ar/llvm-ar.cpp @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// // // Builds up (relatively) standard unix archive files (.a) containing LLVM -// bytecode or other files. +// bitcode or other files. // //===----------------------------------------------------------------------===// @@ -54,7 +54,7 @@ static cl::extrahelp MoreHelp( " [b] - put file(s) before [relpos] (same as [i])\n" " [f] - truncate inserted file names\n" " [i] - put file(s) before [relpos] (same as [b])\n" - " [k] - always print bytecode files (default is to skip them)\n" + " [k] - always print bitcode files (default is to skip them)\n" " [N] - use instance [count] of name\n" " [o] - preserve original dates\n" " [P] - use full path names when matching\n" @@ -88,7 +88,7 @@ bool AddBefore = false; ///< 'b' modifier bool Create = false; ///< 'c' modifier bool TruncateNames = false; ///< 'f' modifier bool InsertBefore = false; ///< 'i' modifier -bool DontSkipBytecode = false; ///< 'k' modifier +bool DontSkipBitcode = false; ///< 'k' modifier bool UseCount = false; ///< 'N' modifier bool OriginalDates = false; ///< 'o' modifier bool FullPath = false; ///< 'P' modifier @@ -193,7 +193,7 @@ ArchiveOperation parseCommandLine() { case 'x': ++NumOperations; Operation = Extract; break; case 'c': Create = true; break; case 'f': TruncateNames = true; break; - case 'k': DontSkipBytecode = true; break; + case 'k': DontSkipBitcode = true; break; case 'l': /* accepted but unused */ break; case 'o': OriginalDates = true; break; case 'P': FullPath = true; break; @@ -341,7 +341,7 @@ void printSymbolTable() { // doPrint - Implements the 'p' operation. This function traverses the archive // looking for members that match the path list. It is careful to uncompress -// things that should be and to skip bytecode files unless the 'k' modifier was +// things that should be and to skip bitcode files unless the 'k' modifier was // given. bool doPrint(std::string* ErrMsg) { if (buildPaths(false, ErrMsg)) @@ -356,7 +356,7 @@ bool doPrint(std::string* ErrMsg) { // Skip things that don't make sense to print if (I->isLLVMSymbolTable() || I->isSVR4SymbolTable() || - I->isBSD4SymbolTable() || (!DontSkipBytecode && + I->isBSD4SymbolTable() || (!DontSkipBitcode && (I->isBytecode() || I->isCompressedBytecode()))) continue; @@ -694,7 +694,7 @@ int main(int argc, char **argv) { // like --help and --version. cl::ParseCommandLineOptions(argc, argv, " LLVM Archiver (llvm-ar)\n\n" - " This program archives bytecode files into single libraries\n" + " This program archives bitcode files into single libraries\n" ); // Print a stack trace if we signal out. diff --git a/tools/llvm-as/llvm-as.cpp b/tools/llvm-as/llvm-as.cpp index e4c7344776..41b6846fe1 100644 --- a/tools/llvm-as/llvm-as.cpp +++ b/tools/llvm-as/llvm-as.cpp @@ -125,7 +125,7 @@ int main(int argc, char **argv) { return 1; } - if (Force || !CheckBytecodeOutputToConsole(Out,true)) + if (Force || !CheckBitcodeOutputToConsole(Out,true)) WriteBitcodeToFile(M.get(), *Out); } catch (const std::string& msg) { cerr << argv[0] << ": " << msg << "\n"; diff --git a/tools/llvm-db/Commands.cpp b/tools/llvm-db/Commands.cpp index e0162e3956..a3d14b0085 100644 --- a/tools/llvm-db/Commands.cpp +++ b/tools/llvm-db/Commands.cpp @@ -219,7 +219,7 @@ void CLIDebugger::parseProgramOptions(std::string &Options) { /// file command - If the user specifies an option, search the PATH for the -/// specified program/bytecode file and load it. If the user does not specify +/// specified program/bitcode file and load it. If the user does not specify /// an option, unload the current program. void CLIDebugger::fileCommand(std::string &Options) { std::string Prog = getToken(Options); diff --git a/tools/llvm-dis/llvm-dis.cpp b/tools/llvm-dis/llvm-dis.cpp index 97ec4c7306..0c87f8ce66 100644 --- a/tools/llvm-dis/llvm-dis.cpp +++ b/tools/llvm-dis/llvm-dis.cpp @@ -8,8 +8,8 @@ //===----------------------------------------------------------------------===// // // This utility may be invoked in the following manner: -// llvm-dis [options] - Read LLVM bytecode from stdin, write asm to stdout -// llvm-dis [options] x.bc - Read LLVM bytecode from the x.bc file, write asm +// llvm-dis [options] - Read LLVM bitcode from stdin, write asm to stdout +// llvm-dis [options] x.bc - Read LLVM bitcode from the x.bc file, write asm // to the x.ll file. // Options: // --help - Output information about command line switches @@ -31,7 +31,7 @@ using namespace llvm; static cl::opt -InputFilename(cl::Positional, cl::desc(""), cl::init("-")); +InputFilename(cl::Positional, cl::desc(""), cl::init("-")); static cl::opt OutputFilename("o", cl::desc("Override output filename"), @@ -65,7 +65,7 @@ int main(int argc, char **argv) { if (ErrorMessage.size()) cerr << ErrorMessage << "\n"; else - cerr << "bytecode didn't read correctly.\n"; + cerr << "bitcode didn't read correctly.\n"; return 1; } diff --git a/tools/llvm-extract/llvm-extract.cpp b/tools/llvm-extract/llvm-extract.cpp index 441063848c..becceb690b 100644 --- a/tools/llvm-extract/llvm-extract.cpp +++ b/tools/llvm-extract/llvm-extract.cpp @@ -28,7 +28,7 @@ using namespace llvm; // InputFilename - The filename to read from. static cl::opt -InputFilename(cl::Positional, cl::desc(""), +InputFilename(cl::Positional, cl::desc(""), cl::init("-"), cl::value_desc("filename")); static cl::opt @@ -67,7 +67,7 @@ int main(int argc, char **argv) { delete Buffer; if (M.get() == 0) { - cerr << argv[0] << ": bytecode didn't read correctly.\n"; + cerr << argv[0] << ": bitcode didn't read correctly.\n"; return 1; } diff --git a/tools/llvm-ld/llvm-ld.cpp b/tools/llvm-ld/llvm-ld.cpp index c86341fda5..46788b1011 100644 --- a/tools/llvm-ld/llvm-ld.cpp +++ b/tools/llvm-ld/llvm-ld.cpp @@ -11,7 +11,7 @@ // system 'ld' conventions. As such, the default output file is ./a.out. // Additionally, this program outputs a shell script that is used to invoke LLI // to execute the program. In this manner, the generated executable (a.out for -// example), is directly executable, whereas the bytecode file actually lives in +// example), is directly executable, whereas the bitcode file actually lives in // the a.out.bc file generated by this program. Also, Force is on by default. // // Note that if someone (or a script) deletes the executable program generated, @@ -42,7 +42,7 @@ using namespace llvm; // Input/Output Options static cl::list InputFilenames(cl::Positional, cl::OneOrMore, - cl::desc("")); + cl::desc("")); static cl::opt OutputFilename("o", cl::init("a.out"), cl::desc("Override output filename"), @@ -203,11 +203,11 @@ static void RemoveEnv(const char * name, char ** const envp) { return; } -/// GenerateBytecode - generates a bytecode file from the module provided -void GenerateBytecode(Module* M, const std::string& FileName) { +/// GenerateBitcode - generates a bitcode file from the module provided +void GenerateBitcode(Module* M, const std::string& FileName) { if (Verbose) - cout << "Generating Bytecode To " << FileName << '\n'; + cout << "Generating Bitcode To " << FileName << '\n'; // Create the output file. std::ios::openmode io_mode = std::ios::out | std::ios::trunc | @@ -216,22 +216,22 @@ void GenerateBytecode(Module* M, const std::string& FileName) { if (!Out.good()) PrintAndExit("error opening '" + FileName + "' for writing!"); - // Ensure that the bytecode file gets removed from the disk if we get a + // Ensure that the bitcode file gets removed from the disk if we get a // terminating signal. sys::RemoveFileOnSignal(sys::Path(FileName)); // Write it out WriteBitcodeToFile(M, Out); - // Close the bytecode file. + // Close the bitcode file. Out.close(); } /// GenerateAssembly - generates a native assembly language source file from the -/// specified bytecode file. +/// specified bitcode file. /// /// Inputs: -/// InputFilename - The name of the input bytecode file. +/// InputFilename - The name of the input bitcode file. /// OutputFilename - The name of the file to generate. /// llc - The pathname to use for LLC. /// envp - The environment to use when running LLC. @@ -242,7 +242,7 @@ static int GenerateAssembly(const std::string &OutputFilename, const std::string &InputFilename, const sys::Path &llc, std::string &ErrMsg ) { - // Run LLC to convert the bytecode file into assembly code. + // Run LLC to convert the bitcode file into assembly code. std::vector args; args.push_back(llc.c_str()); args.push_back("-f"); @@ -259,12 +259,12 @@ static int GenerateAssembly(const std::string &OutputFilename, return sys::Program::ExecuteAndWait(llc, &args[0], 0, 0, 0, 0, &ErrMsg); } -/// GenerateCFile - generates a C source file from the specified bytecode file. +/// GenerateCFile - generates a C source file from the specified bitcode file. static int GenerateCFile(const std::string &OutputFile, const std::string &InputFile, const sys::Path &llc, std::string& ErrMsg) { - // Run LLC to convert the bytecode file into C. + // Run LLC to convert the bitcode file into C. std::vector args; args.push_back(llc.c_str()); args.push_back("-march=c"); @@ -283,10 +283,10 @@ static int GenerateCFile(const std::string &OutputFile, } /// GenerateNative - generates a native object file from the -/// specified bytecode file. +/// specified bitcode file. /// /// Inputs: -/// InputFilename - The name of the input bytecode file. +/// InputFilename - The name of the input bitcode file. /// OutputFilename - The name of the file to generate. /// NativeLinkItems - The native libraries, files, code with which to link /// LibPaths - The list of directories in which to find libraries. @@ -377,7 +377,7 @@ static int GenerateNative(const std::string &OutputFilename, } /// EmitShellScript - Output the wrapper file that invokes the JIT on the LLVM -/// bytecode file for the program. +/// bitcode file for the program. static void EmitShellScript(char **argv) { if (Verbose) cout << "Emitting Shell Script\n"; @@ -478,7 +478,7 @@ int main(int argc, char **argv, char **envp) { // Construct a Linker (now that Verbose is set) Linker TheLinker(progname, OutputFilename, Verbose); - // Keep track of the native link items (versus the bytecode items) + // Keep track of the native link items (versus the bitcode items) Linker::ItemList NativeLinkItems; // Add library paths to the linker @@ -517,10 +517,10 @@ int main(int argc, char **argv, char **envp) { // Optimize the module Optimize(Composite.get()); - // Generate the bytecode for the optimized module. - std::string RealBytecodeOutput = OutputFilename; - if (!LinkAsLibrary) RealBytecodeOutput += ".bc"; - GenerateBytecode(Composite.get(), RealBytecodeOutput); + // Generate the bitcode for the optimized module. + std::string RealBitcodeOutput = OutputFilename; + if (!LinkAsLibrary) RealBitcodeOutput += ".bc"; + GenerateBitcode(Composite.get(), RealBitcodeOutput); // If we are not linking a library, generate either a native executable // or a JIT shell script, depending upon what the user wants. @@ -545,17 +545,17 @@ int main(int argc, char **argv, char **envp) { const char* args[4]; args[0] = I->c_str(); - args[1] = RealBytecodeOutput.c_str(); + args[1] = RealBitcodeOutput.c_str(); args[2] = tmp_output.c_str(); args[3] = 0; if (0 == sys::Program::ExecuteAndWait(prog, args, 0,0,0,0, &ErrMsg)) { - if (tmp_output.isBytecodeFile() || tmp_output.isBitcodeFile()) { - sys::Path target(RealBytecodeOutput); + if (tmp_output.isBitcodeFile() || tmp_output.isBitcodeFile()) { + sys::Path target(RealBitcodeOutput); target.eraseFromDisk(); if (tmp_output.renamePathOnDisk(target, &ErrMsg)) PrintAndExit(ErrMsg, 2); } else - PrintAndExit("Post-link optimization output is not bytecode"); + PrintAndExit("Post-link optimization output is not bitcode"); } else { PrintAndExit(ErrMsg); } @@ -563,9 +563,9 @@ int main(int argc, char **argv, char **envp) { } // If the user wants to generate a native executable, compile it from the - // bytecode file. + // bitcode file. // - // Otherwise, create a script that will run the bytecode through the JIT. + // Otherwise, create a script that will run the bitcode through the JIT. if (Native) { // Name of the Assembly Language output file sys::Path AssemblyFile ( OutputFilename); @@ -584,9 +584,9 @@ int main(int argc, char **argv, char **envp) { if (gcc.isEmpty()) PrintAndExit("Failed to find gcc"); - // Generate an assembly language file for the bytecode. + // Generate an assembly language file for the bitcode. std::string ErrMsg; - if (0 != GenerateAssembly(AssemblyFile.toString(), RealBytecodeOutput, + if (0 != GenerateAssembly(AssemblyFile.toString(), RealBitcodeOutput, llc, ErrMsg)) PrintAndExit(ErrMsg); @@ -613,10 +613,10 @@ int main(int argc, char **argv, char **envp) { if (gcc.isEmpty()) PrintAndExit("Failed to find gcc"); - // Generate an assembly language file for the bytecode. + // Generate an assembly language file for the bitcode. std::string ErrMsg; if (0 != GenerateCFile( - CFile.toString(), RealBytecodeOutput, llc, ErrMsg)) + CFile.toString(), RealBitcodeOutput, llc, ErrMsg)) PrintAndExit(ErrMsg); if (0 != GenerateNative(OutputFilename, CFile.toString(), @@ -635,11 +635,11 @@ int main(int argc, char **argv, char **envp) { if (sys::Path(OutputFilename).makeExecutableOnDisk(&ErrMsg)) PrintAndExit(ErrMsg); - // Make the bytecode file readable and directly executable in LLEE as well - if (sys::Path(RealBytecodeOutput).makeExecutableOnDisk(&ErrMsg)) + // Make the bitcode file readable and directly executable in LLEE as well + if (sys::Path(RealBitcodeOutput).makeExecutableOnDisk(&ErrMsg)) PrintAndExit(ErrMsg); - if (sys::Path(RealBytecodeOutput).makeReadableOnDisk(&ErrMsg)) + if (sys::Path(RealBitcodeOutput).makeReadableOnDisk(&ErrMsg)) PrintAndExit(ErrMsg); } } catch (const std::string& msg) { diff --git a/tools/llvm-link/llvm-link.cpp b/tools/llvm-link/llvm-link.cpp index 28be3a97f3..5db13aabae 100644 --- a/tools/llvm-link/llvm-link.cpp +++ b/tools/llvm-link/llvm-link.cpp @@ -28,7 +28,7 @@ using namespace llvm; static cl::list InputFilenames(cl::Positional, cl::OneOrMore, - cl::desc("")); + cl::desc("")); static cl::opt OutputFilename("o", cl::desc("Override output filename"), cl::init("-"), @@ -42,7 +42,7 @@ Verbose("v", cl::desc("Print information about actions taken")); static cl::opt DumpAsm("d", cl::desc("Print assembly as linked"), cl::Hidden); -// LoadFile - Read the specified bytecode file in and return it. This routine +// LoadFile - Read the specified bitcode file in and return it. This routine // searches the link path for the specified file to try to find it... // static inline std::auto_ptr LoadFile(const std::string &FN) { @@ -66,12 +66,12 @@ static inline std::auto_ptr LoadFile(const std::string &FN) { if (Result) return std::auto_ptr(Result); // Load successful! if (Verbose) { - cerr << "Error opening bytecode file: '" << Filename.c_str() << "'"; + cerr << "Error opening bitcode file: '" << Filename.c_str() << "'"; if (ErrorMessage.size()) cerr << ": " << ErrorMessage; cerr << "\n"; } } else { - cerr << "Bytecode file: '" << Filename.c_str() << "' does not exist.\n"; + cerr << "Bitcode file: '" << Filename.c_str() << "' does not exist.\n"; } return std::auto_ptr(); @@ -142,7 +142,7 @@ int main(int argc, char **argv) { return 1; } - if (Verbose) cerr << "Writing bytecode...\n"; + if (Verbose) cerr << "Writing bitcode...\n"; WriteBitcodeToFile(Composite.get(), *Out); if (Out != &std::cout) delete Out; diff --git a/tools/llvm-nm/llvm-nm.cpp b/tools/llvm-nm/llvm-nm.cpp index a1890a9d26..bf98653179 100644 --- a/tools/llvm-nm/llvm-nm.cpp +++ b/tools/llvm-nm/llvm-nm.cpp @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// // // This program is a utility that works like traditional Unix "nm", -// that is, it prints out the names of symbols in a bytecode file, +// that is, it prints out the names of symbols in a bitcode file, // along with some information about each symbol. // // This "nm" does not print symbols' addresses. It supports many of @@ -43,7 +43,7 @@ namespace { cl::aliasopt(OutputFormat)); cl::list - InputFilenames(cl::Positional, cl::desc(""), + InputFilenames(cl::Positional, cl::desc(""), cl::ZeroOrMore); cl::opt UndefinedOnly("undefined-only", diff --git a/tools/llvm-prof/llvm-prof.cpp b/tools/llvm-prof/llvm-prof.cpp index c85b0da1bc..dcb9d1ff21 100644 --- a/tools/llvm-prof/llvm-prof.cpp +++ b/tools/llvm-prof/llvm-prof.cpp @@ -32,8 +32,8 @@ using namespace llvm; namespace { cl::opt - BytecodeFile(cl::Positional, cl::desc(""), - cl::Required); + BitcodeFile(cl::Positional, cl::desc(""), + cl::Required); cl::opt ProfileDataFile(cl::Positional, cl::desc(""), @@ -115,16 +115,16 @@ int main(int argc, char **argv) { cl::ParseCommandLineOptions(argc, argv, " llvm profile dump decoder\n"); sys::PrintStackTraceOnErrorSignal(); - // Read in the bytecode file... + // Read in the bitcode file... std::string ErrorMessage; Module *M = 0; - if (MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(BytecodeFile, + if (MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(BitcodeFile, &ErrorMessage)) { M = ParseBitcodeFile(Buffer, &ErrorMessage); delete Buffer; } if (M == 0) { - std::cerr << argv[0] << ": " << BytecodeFile << ": " + std::cerr << argv[0] << ": " << BitcodeFile << ": " << ErrorMessage << "\n"; return 1; } diff --git a/tools/llvm-ranlib/llvm-ranlib.cpp b/tools/llvm-ranlib/llvm-ranlib.cpp index 440b536194..9085b7ed45 100644 --- a/tools/llvm-ranlib/llvm-ranlib.cpp +++ b/tools/llvm-ranlib/llvm-ranlib.cpp @@ -48,7 +48,7 @@ int main(int argc, char **argv) { // like --help and --version. cl::ParseCommandLineOptions(argc, argv, " LLVM Archive Index Generator (llvm-ranlib)\n\n" - " This program adds or updates an index of bytecode symbols\n" + " This program adds or updates an index of bitcode symbols\n" " to an LLVM archive file." ); diff --git a/tools/llvm2cpp/llvm2cpp.cpp b/tools/llvm2cpp/llvm2cpp.cpp index d4382cd5ce..2db7543f48 100644 --- a/tools/llvm2cpp/llvm2cpp.cpp +++ b/tools/llvm2cpp/llvm2cpp.cpp @@ -31,7 +31,7 @@ using namespace llvm; static cl::opt -InputFilename(cl::Positional, cl::desc(""), +InputFilename(cl::Positional, cl::desc(""), cl::init("-")); static cl::opt @@ -60,7 +60,7 @@ int main(int argc, char **argv) { if (ErrorMessage.size()) std::cerr << ErrorMessage << "\n"; else - std::cerr << "bytecode didn't read correctly.\n"; + std::cerr << "bitcode didn't read correctly.\n"; return 1; } diff --git a/tools/llvmc/CompilerDriver.cpp b/tools/llvmc/CompilerDriver.cpp index b170270b0c..4be9f138ae 100644 --- a/tools/llvmc/CompilerDriver.cpp +++ b/tools/llvmc/CompilerDriver.cpp @@ -65,9 +65,9 @@ void DumpConfigData(CompilerDriver::ConfigData* cd, const std::string& type ){ DumpAction(&cd->Linker); } -static bool GetBytecodeDependentLibraries(const std::string &fname, - Module::LibraryListType& deplibs, - std::string* ErrMsg) { +static bool GetBitcodeDependentLibraries(const std::string &fname, + Module::LibraryListType& deplibs, + std::string* ErrMsg) { ModuleProvider *MP = 0; if (MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(fname)) { MP = getBitcodeModuleProvider(Buffer); @@ -558,8 +558,8 @@ private: } /// This method processes a linkage item. The item could be a - /// Bytecode file needing translation to native code and that is - /// dependent on other bytecode libraries, or a native code + /// Bitcode file needing translation to native code and that is + /// dependent on other bitcode libraries, or a native code /// library that should just be linked into the program. bool ProcessLinkageItem(const llvm::sys::Path& link_item, SetVector& set, @@ -586,11 +586,11 @@ private: // If we got here fullpath is the path to the file, and its readable. set.insert(fullpath); - // If its an LLVM bytecode file ... - if (fullpath.isBytecodeFile()) { + // If its an LLVM bitcode file ... + if (fullpath.isBitcodeFile()) { // Process the dependent libraries recursively Module::LibraryListType modlibs; - if (GetBytecodeDependentLibraries(fullpath.toString(),modlibs, &err)) { + if (GetBitcodeDependentLibraries(fullpath.toString(),modlibs, &err)) { // Traverse the dependent libraries list Module::lib_iterator LI = modlibs.begin(); Module::lib_iterator LE = modlibs.end(); @@ -675,7 +675,7 @@ public: // Get the suffix of the file name const std::string& ftype = I->second; - // If its a library, bytecode file, or object file, save + // If its a library, bitcode file, or object file, save // it for linking below and short circuit the // pre-processing/translation/assembly phases if (ftype.empty() || ftype == "o" || ftype == "bc" || ftype=="a") { @@ -771,7 +771,7 @@ public: // ll -> bc Helper if (action.isSet(OUTPUT_IS_ASM_FLAG)) { /// The output of the translator is an LLVM Assembly program - /// We need to translate it to bytecode + /// We need to translate it to bitcode Action* action = new Action(); action->program.set("llvm-as"); action->args.push_back(InFile.toString()); @@ -816,7 +816,7 @@ public: // ll -> bc Helper if (action.isSet(OUTPUT_IS_ASM_FLAG)) { /// The output of the optimizer is an LLVM Assembly program - /// We need to translate it to bytecode with llvm-as + /// We need to translate it to bitcode with llvm-as Action* action = new Action(); action->program.set("llvm-as"); action->args.push_back(InFile.toString()); diff --git a/tools/llvmc/CompilerDriver.h b/tools/llvmc/CompilerDriver.h index 02ec0e9f52..f2be5cc8cf 100644 --- a/tools/llvmc/CompilerDriver.h +++ b/tools/llvmc/CompilerDriver.h @@ -43,10 +43,10 @@ namespace llvm { /// @brief The phases of processing that llvmc understands enum Phases { PREPROCESSING, ///< Source language combining, filtering, substitution - TRANSLATION, ///< Translate source -> LLVM bytecode/assembly + TRANSLATION, ///< Translate source -> LLVM bitcode/assembly OPTIMIZATION, ///< Optimize translation result ASSEMBLY, ///< Convert program to executable - LINKING, ///< Link bytecode and native code + LINKING, ///< Link bitcode and native code NUM_PHASES ///< Always last! }; @@ -129,7 +129,7 @@ namespace llvm { TIME_ACTIONS_FLAG = 0x0010, ///< Time the actions as they execute SHOW_STATS_FLAG = 0x0020, ///< Show pass statistics EMIT_NATIVE_FLAG = 0x0040, ///< Emit native code instead of bc - EMIT_RAW_FLAG = 0x0080, ///< Emit raw, unoptimized bytecode + EMIT_RAW_FLAG = 0x0080, ///< Emit raw, unoptimized bitcode KEEP_TEMPS_FLAG = 0x0100, ///< Don't delete temporary files STRIP_OUTPUT_FLAG = 0x0200, ///< Strip symbols from linked output DRIVER_FLAGS_MASK = 0x03FF ///< Union of the above flags diff --git a/tools/llvmc/ConfigLexer.h b/tools/llvmc/ConfigLexer.h index 39960c88b9..9693b34bb4 100644 --- a/tools/llvmc/ConfigLexer.h +++ b/tools/llvmc/ConfigLexer.h @@ -56,7 +56,7 @@ enum ConfigLexerTokens { BINDIR_SUBST, ///< The substitution item %bindir% ASSEMBLY, ///< The value "assembly" (and variants) ASSEMBLER, ///< The name "assembler" (and variants) - BYTECODE, ///< The value "bytecode" (and variants) + BITCODE, ///< The value "bitcode" (and variants) COMMAND, ///< The name "command" (and variants) DEFS_SUBST, ///< The substitution item %defs% EQUALS, ///< The equals sign, = diff --git a/tools/llvmc/ConfigLexer.l b/tools/llvmc/ConfigLexer.l index 34b9a17de1..6bd61c85b9 100644 --- a/tools/llvmc/ConfigLexer.l +++ b/tools/llvmc/ConfigLexer.l @@ -79,7 +79,7 @@ ASSEMBLER assembler|Assembler|ASSEMBLER COMMAND command|Command|COMMAND LANG lang|Lang|LANG LIBS libs|Libs|LIBS -LINKER linker|Linker|LINKER +LINKER linker|Linker|LINKER NAME name|Name|NAME OPT1 opt1|Opt1|OPT1 OPT2 opt2|Opt2|OPT2 @@ -97,7 +97,7 @@ VERSION version|Version|VERSION True true|True|TRUE|on|On|ON|yes|Yes|YES False false|False|FALSE|off|Off|OFF|no|No|NO -Bytecode bc|BC|bytecode|Bytecode|BYTECODE +Bitcode bc|BC|bitcode|Bitcode|BITCODE Assembly asm|ASM|assembly|Assembly|ASSEMBLY BadSubst \%[a-zA-Z]*\% @@ -186,7 +186,7 @@ White [ \t]* %WOpts% { return handleSubstitution(WOPTS_SUBST); } {Assembly} { return handleValueContext(ASSEMBLY); } -{Bytecode} { return handleValueContext(BYTECODE); } +{Bitcode} { return handleValueContext(BITCODE); } {True} { return handleValueContext(TRUETOK); } {False} { return handleValueContext(FALSETOK); } diff --git a/tools/llvmc/Configuration.cpp b/tools/llvmc/Configuration.cpp index 1364e9b2eb..aafca792b1 100644 --- a/tools/llvmc/Configuration.cpp +++ b/tools/llvmc/Configuration.cpp @@ -291,8 +291,8 @@ namespace { case ASSEMBLY: str += "assembly"; break; - case BYTECODE: - str += "bytecode"; + case BITCODE: + str += "bitcode"; break; case TRUETOK: str += "true"; @@ -340,8 +340,8 @@ namespace { case ASSEMBLY: anOption += "assembly"; break; - case BYTECODE: - anOption += "bytecode"; + case BITCODE: + anOption += "bitcode"; break; case TRUETOK: anOption += "true"; @@ -392,7 +392,7 @@ namespace { next(); if (token == ASSEMBLY) { return true; - } else if (token == BYTECODE) { + } else if (token == BITCODE) { return false; } else { error("Expecting output type value"); diff --git a/tools/llvmc/llvmc.cpp b/tools/llvmc/llvmc.cpp index 081ae453ec..c257a3ebab 100644 --- a/tools/llvmc/llvmc.cpp +++ b/tools/llvmc/llvmc.cpp @@ -143,7 +143,7 @@ static cl::opt OutputMachine("m", cl::Prefix, cl::desc("Specify a target machine"), cl::value_desc("machine")); static cl::opt Native("native", cl::init(false), - cl::desc("Generative native code instead of bytecode")); + cl::desc("Generative native code instead of bitcode")); static cl::opt DebugOutput("g", cl::init(false), cl::desc("Generate objects that include debug symbols")); diff --git a/tools/lto/lto-c.cpp b/tools/lto/lto-c.cpp index f89b374e19..ae939a99bf 100644 --- a/tools/lto/lto-c.cpp +++ b/tools/lto/lto-c.cpp @@ -30,7 +30,7 @@ void llvm_destroy_optimizer(llvm_lto_t lto) { delete (llvm::LTO*)lto; } -/// Read an LLVM bytecode file using LTO::readLLVMObjectFile. +/// Read an LLVM bitcode file using LTO::readLLVMObjectFile. extern "C" llvm_lto_status llvm_read_object_file(llvm_lto_t lto, const char *input_filename) { diff --git a/tools/lto/lto.cpp b/tools/lto/lto.cpp index 3420cdf67b..dacea661d1 100644 --- a/tools/lto/lto.cpp +++ b/tools/lto/lto.cpp @@ -107,7 +107,7 @@ LTO::removeModule (const std::string &InputFilename) delete m; } -/// InputFilename is a LLVM bytecode file. If Module with InputFilename is +/// InputFilename is a LLVM bitcode file. If Module with InputFilename is /// available then return it. Otherwise parseInputFilename. Module * LTO::getModule(const std::string &InputFilename) @@ -128,7 +128,7 @@ LTO::getModule(const std::string &InputFilename) return m; } -/// InputFilename is a LLVM bytecode file. Reade this bytecode file and +/// InputFilename is a LLVM bitcode file. Reade this bitcode file and /// set corresponding target triplet string. void LTO::getTargetTriple(const std::string &InputFilename, @@ -139,7 +139,7 @@ LTO::getTargetTriple(const std::string &InputFilename, targetTriple = m->getTargetTriple(); } -/// InputFilename is a LLVM bytecode file. Read it using bytecode reader. +/// InputFilename is a LLVM bitcode file. Read it using bitcode reader. /// Collect global functions and symbol names in symbols vector. /// Collect external references in references vector. /// Return LTO_READ_SUCCESS if there is no error. diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index ace0d3c9bc..4eca308425 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -46,7 +46,7 @@ PassList(cl::desc("Optimizations available:")); // Other command line options... // static cl::opt -InputFilename(cl::Positional, cl::desc(""), +InputFilename(cl::Positional, cl::desc(""), cl::init("-"), cl::value_desc("filename")); static cl::opt @@ -61,7 +61,7 @@ PrintEachXForm("p", cl::desc("Print module after each transformation")); static cl::opt NoOutput("disable-output", - cl::desc("Do not write result bytecode file"), cl::Hidden); + cl::desc("Do not write result bitcode file"), cl::Hidden); static cl::opt NoVerify("disable-verify", cl::desc("Do not verify result module"), cl::Hidden); @@ -330,7 +330,7 @@ int main(int argc, char **argv) { if (ErrorMessage.size()) cerr << ErrorMessage << "\n"; else - cerr << "bytecode didn't read correctly.\n"; + cerr << "bitcode didn't read correctly.\n"; return 1; } @@ -362,7 +362,7 @@ int main(int argc, char **argv) { // If the output is set to be emitted to standard out, and standard out is a // console, print out a warning message and refuse to do it. We don't // impress anyone by spewing tons of binary goo to a terminal. - if (!Force && !NoOutput && CheckBytecodeOutputToConsole(Out,!Quiet)) { + if (!Force && !NoOutput && CheckBitcodeOutputToConsole(Out,!Quiet)) { NoOutput = true; } @@ -418,7 +418,7 @@ int main(int argc, char **argv) { if (!NoVerify && !VerifyEach) Passes.add(createVerifierPass()); - // Write bytecode out to disk or cout as the last step... + // Write bitcode out to disk or cout as the last step... if (!NoOutput && !AnalyzeOnly) Passes.add(CreateBitcodeWriterPass(*Out)); -- cgit v1.2.3