[llvm-commits] CVS: llvm/include/llvm/Bytecode/Analyzer.h Archive.h BytecodeHandler.h Format.h Reader.h WriteBytecodePass.h Writer.h
Misha Brukman
brukman at cs.uiuc.edu
Thu Apr 21 13:34:24 PDT 2005
Changes in directory llvm/include/llvm/Bytecode:
Analyzer.h updated: 1.10 -> 1.11
Archive.h updated: 1.10 -> 1.11
BytecodeHandler.h updated: 1.7 -> 1.8
Format.h updated: 1.11 -> 1.12
Reader.h updated: 1.23 -> 1.24
WriteBytecodePass.h updated: 1.14 -> 1.15
Writer.h updated: 1.8 -> 1.9
---
Log message:
Remove trailing whitespace
---
Diffs of the changes: (+132 -132)
Analyzer.h | 26 +++++-----
Archive.h | 126 ++++++++++++++++++++++++++--------------------------
BytecodeHandler.h | 68 ++++++++++++++--------------
Format.h | 14 ++---
Reader.h | 14 ++---
WriteBytecodePass.h | 10 ++--
Writer.h | 6 +-
7 files changed, 132 insertions(+), 132 deletions(-)
Index: llvm/include/llvm/Bytecode/Analyzer.h
diff -u llvm/include/llvm/Bytecode/Analyzer.h:1.10 llvm/include/llvm/Bytecode/Analyzer.h:1.11
--- llvm/include/llvm/Bytecode/Analyzer.h:1.10 Sat Jan 15 19:22:18 2005
+++ llvm/include/llvm/Bytecode/Analyzer.h Thu Apr 21 15:34:13 2005
@@ -1,17 +1,17 @@
//===-- llvm/Bytecode/Analyzer.h - Analyzer for Bytecode files --*- C++ -*-===//
-//
+//
// The LLVM Compiler Infrastructure
//
-// This file was developed by Reid Spencer and is distributed under the
+// This file was developed by Reid Spencer and is distributed under the
// University of Illinois Open Source License. See LICENSE.TXT for details.
-//
+//
//===----------------------------------------------------------------------===//
//
// This functionality is implemented by the lib/Bytecode/Reader library.
// It is used to read VM bytecode files from a file or memory buffer
-// and print out a diagnostic analysis of the contents of the file. It is
-// intended for three uses: (a) understanding the bytecode format, (b) ensuring
-// correctness of bytecode format, (c) statistical analysis of generated
+// and print out a diagnostic analysis of the contents of the file. It is
+// intended for three uses: (a) understanding the bytecode format, (b) ensuring
+// correctness of bytecode format, (c) statistical analysis of generated
// bytecode files.
//
//===----------------------------------------------------------------------===//
@@ -30,8 +30,8 @@
class Function;
class Module;
-/// This structure is used to contain the output of the Bytecode Analysis
-/// library. It simply contains fields to hold each item of the analysis
+/// This structure is used to contain the output of the Bytecode Analysis
+/// library. It simply contains fields to hold each item of the analysis
/// results.
/// @brief Bytecode Analysis results structure
struct BytecodeAnalysis {
@@ -68,7 +68,7 @@
unsigned vbrCompBytes; ///< Number of vbr bytes (compressed)
unsigned vbrExpdBytes; ///< Number of vbr bytes (expanded)
- typedef std::map<BytecodeFormat::CompressedBytecodeBlockIdentifiers,unsigned>
+ typedef std::map<BytecodeFormat::CompressedBytecodeBlockIdentifiers,unsigned>
BlockSizeMap;
BlockSizeMap BlockSizes;
@@ -91,20 +91,20 @@
unsigned vbrExpdBytes; ///< Number of vbr bytes (expanded)
};
- /// A mapping of function slot numbers to the collected information about
+ /// A mapping of function slot numbers to the collected information about
/// the function.
- std::map<const Function*,BytecodeFunctionInfo> FunctionInfo;
+ std::map<const Function*,BytecodeFunctionInfo> FunctionInfo;
/// The content of the progressive verification
std::string VerifyInfo;
/// Flags for what should be done
- bool detailedResults; ///< If true, FunctionInfo has contents
+ bool detailedResults; ///< If true, FunctionInfo has contents
bool progressiveVerify; ///< If true, VerifyInfo has contents
};
/// This function is the main entry point into the bytecode analysis library. It
-/// allows you to simply provide a \p filename and storage for the \p Results
+/// allows you to simply provide a \p filename and storage for the \p Results
/// that will be filled in with the analysis results.
/// @brief Analyze contents of a bytecode File
Module* AnalyzeBytecodeFile(
Index: llvm/include/llvm/Bytecode/Archive.h
diff -u llvm/include/llvm/Bytecode/Archive.h:1.10 llvm/include/llvm/Bytecode/Archive.h:1.11
--- llvm/include/llvm/Bytecode/Archive.h:1.10 Sat Feb 26 16:00:32 2005
+++ llvm/include/llvm/Bytecode/Archive.h Thu Apr 21 15:34:13 2005
@@ -1,16 +1,16 @@
//===-- llvm/Bytecode/Archive.h - LLVM Bytecode Archive ---------*- C++ -*-===//
-//
+//
// The LLVM Compiler Infrastructure
//
-// This file was developed by Reid Spencer and is distributed under the
+// This file was developed by Reid Spencer and is distributed under the
// University of Illinois Open Source License. See LICENSE.TXT for details.
-//
+//
//===----------------------------------------------------------------------===//
//
// This header file declares the Archive and ArchiveMember classes that provide
// manipulation of LLVM Archive files. The implementation is provided by the
-// lib/Bytecode/Archive library. This library is used to read and write
-// archive (*.a) files that contain LLVM bytecode files (or others).
+// lib/Bytecode/Archive library. This library is used to read and write
+// archive (*.a) files that contain LLVM bytecode files (or others).
//
//===----------------------------------------------------------------------===//
@@ -26,7 +26,7 @@
namespace llvm {
-// Forward declare classes
+// Forward declare classes
class ModuleProvider; // From VMCore
class Module; // From VMCore
class Archive; // Declared below
@@ -34,9 +34,9 @@
/// This class is the main class manipulated by users of the Archive class. It
/// holds information about one member of the Archive. It is also the element
-/// stored by the Archive's ilist, the Archive's main abstraction. Because of
-/// the special requirements of archive files, users are not permitted to
-/// construct ArchiveMember instances. You should obtain them from the methods
+/// stored by the Archive's ilist, the Archive's main abstraction. Because of
+/// the special requirements of archive files, users are not permitted to
+/// construct ArchiveMember instances. You should obtain them from the methods
/// of the Archive class instead.
/// @brief This class represents a single archive member.
class ArchiveMember {
@@ -77,19 +77,19 @@
/// @brief Get the user associated with this archive member.
unsigned getUser() const { return info.user; }
- /// The "group" is the owning group of the file per Unix security. This
- /// may not have any applicability on non-Unix systems but is a required
+ /// The "group" is the owning group of the file per Unix security. This
+ /// may not have any applicability on non-Unix systems but is a required
/// component of the "ar" file format.
/// @brief Get the group associated with this archive member.
unsigned getGroup() const { return info.group; }
- /// The "mode" specifies the access permissions for the file per Unix
+ /// The "mode" specifies the access permissions for the file per Unix
/// security. This may not have any applicabiity on non-Unix systems but is
/// a required component of the "ar" file format.
/// @brief Get the permission mode associated with this archive member.
unsigned getMode() const { return info.mode; }
- /// This method returns the time at which the archive member was last
+ /// This method returns the time at which the archive member was last
/// modified when it was not in the archive.
/// @brief Get the time of last modification of the archive member.
sys::TimeValue getModTime() const { return info.modTime; }
@@ -98,7 +98,7 @@
/// @brief Get the size of the archive member.
unsigned getSize() const { return info.fileSize; }
- /// This method returns the total size of the archive member as it
+ /// This method returns the total size of the archive member as it
/// appears on disk. This includes the file content, the header, the
/// long file name if any, and the padding.
/// @brief Get total on-disk member size.
@@ -106,7 +106,7 @@
/// This method will return a pointer to the in-memory content of the
/// archive member, if it is available. If the data has not been loaded
- /// into memory, the return value will be null.
+ /// into memory, the return value will be null.
/// @returns a pointer to the member's data.
/// @brief Get the data content of the archive member
const void* getData() const { return data; }
@@ -147,7 +147,7 @@
bool hasPath() const { return flags&HasPathFlag; }
/// Long filenames are an artifact of the ar(1) file format which allows
- /// up to sixteen characters in its header and doesn't allow a path
+ /// up to sixteen characters in its header and doesn't allow a path
/// separator character (/). To avoid this, a "long format" member name is
/// allowed that doesn't have this restriction. This method determines if
/// that "long format" is used for this member.
@@ -158,7 +158,7 @@
/// This method returns the status info (like Unix stat(2)) for the archive
/// member. The status info provides the file's size, permissions, and
/// modification time. The contents of the Path::StatusInfo structure, other
- /// than the size and modification time, may not have utility on non-Unix
+ /// than the size and modification time, may not have utility on non-Unix
/// systems.
/// @returns the status info for the archive member
/// @brief Obtain the status info for the archive member
@@ -212,14 +212,14 @@
/// @}
};
-/// This class defines the interface to LLVM Archive files. The Archive class
-/// presents the archive file as an ilist of ArchiveMember objects. The members
+/// This class defines the interface to LLVM Archive files. The Archive class
+/// presents the archive file as an ilist of ArchiveMember objects. The members
/// can be rearranged in any fashion either by directly editing the ilist or by
-/// using editing methods on the Archive class (recommended). The Archive
-/// class also provides several ways of accessing the archive file for various
+/// using editing methods on the Archive class (recommended). The Archive
+/// class also provides several ways of accessing the archive file for various
/// purposes such as editing and linking. Full symbol table support is provided
-/// for loading only those files that resolve symbols. Note that read
-/// performance of this library is _crucial_ for performance of JIT type
+/// for loading only those files that resolve symbols. Note that read
+/// performance of this library is _crucial_ for performance of JIT type
/// applications and the linkers. Consequently, the implementation of the class
/// is optimized for reading.
class Archive {
@@ -273,12 +273,12 @@
/// @{
public:
/// This method splices a \p src member from an archive (possibly \p this),
- /// to a position just before the member given by \p dest in \p this. When
+ /// to a position just before the member given by \p dest in \p this. When
/// the archive is written, \p src will be written in its new location.
/// @brief Move a member to a new location
inline void splice(iterator dest, Archive& arch, iterator src)
{ return members.splice(dest,arch.members,src); }
-
+
/// This method erases a \p target member from the archive. When the
/// archive is written, it will no longer contain \p target. The associated
/// ArchiveMember is deleted.
@@ -290,10 +290,10 @@
/// @{
public:
/// Create an empty archive file and associate it with the \p Filename. This
- /// method does not actually create the archive disk file. It creates an
+ /// method does not actually create the archive disk file. It creates an
/// empty Archive object. If the writeToDisk method is called, the archive
- /// file \p Filename will be created at that point, with whatever content
- /// the returned Archive object has at that time.
+ /// file \p Filename will be created at that point, with whatever content
+ /// the returned Archive object has at that time.
/// @returns An Archive* that represents the new archive file.
/// @brief Create an empty Archive.
static Archive* CreateEmpty(
@@ -314,15 +314,15 @@
/// This method opens an existing archive file from \p Filename and reads in
/// its symbol table without reading in any of the archive's members. This
/// reduces both I/O and cpu time in opening the archive if it is to be used
- /// solely for symbol lookup (e.g. during linking). The \p Filename must
+ /// solely for symbol lookup (e.g. during linking). The \p Filename must
/// exist and be an archive file or an exception will be thrown. This form
/// of opening the archive is intended for read-only operations that need to
/// locate members via the symbol table for link editing. Since the archve
/// members are not read by this method, the archive will appear empty upon
- /// return. If editing operations are performed on the archive, they will
+ /// return. If editing operations are performed on the archive, they will
/// completely replace the contents of the archive! It is recommended that
/// if this form of opening the archive is used that only the symbol table
- /// lookup methods (getSymbolTable, findModuleDefiningSymbol, and
+ /// lookup methods (getSymbolTable, findModuleDefiningSymbol, and
/// findModulesDefiningSymbols) be used.
/// @throws std::string if an error occurs opening the file
/// @returns an Archive* that represents the archive file.
@@ -333,11 +333,11 @@
);
/// This destructor cleans up the Archive object, releases all memory, and
- /// closes files. It does nothing with the archive file on disk. If you
- /// haven't used the writeToDisk method by the time the destructor is
+ /// closes files. It does nothing with the archive file on disk. If you
+ /// haven't used the writeToDisk method by the time the destructor is
/// called, all changes to the archive will be lost.
/// @throws std::string if an error occurs
- /// @brief Destruct in-memory archive
+ /// @brief Destruct in-memory archive
~Archive();
/// @}
@@ -355,15 +355,15 @@
/// @brief Get the iplist of the members
MembersList& getMembers() { return members; }
- /// This method allows direct query of the Archive's symbol table. The
+ /// This method allows direct query of the Archive's symbol table. The
/// symbol table is a std::map of std::string (the symbol) to unsigned (the
- /// file offset). Note that for efficiency reasons, the offset stored in
+ /// file offset). Note that for efficiency reasons, the offset stored in
/// the symbol table is not the actual offset. It is the offset from the
/// beginning of the first "real" file member (after the symbol table). Use
/// the getFirstFileOffset() to obtain that offset and add this value to the
- /// offset in the symbol table to obtain the real file offset. Note that
- /// there is purposefully no interface provided by Archive to look up
- /// members by their offset. Use the findModulesDefiningSymbols and
+ /// offset in the symbol table to obtain the real file offset. Note that
+ /// there is purposefully no interface provided by Archive to look up
+ /// members by their offset. Use the findModulesDefiningSymbols and
/// findModuleDefiningSymbol methods instead.
/// @returns the Archive's symbol table.
/// @brief Get the archive's symbol table
@@ -386,15 +386,15 @@
/// @brief Instantiate all the bytecode modules located in the archive
bool getAllModules(std::vector<Module*>& Modules, std::string* ErrMessage);
- /// This accessor looks up the \p symbol in the archive's symbol table and
+ /// This accessor looks up the \p symbol in the archive's symbol table and
/// returns the associated module that defines that symbol. This method can
- /// be called as many times as necessary. This is handy for linking the
+ /// be called as many times as necessary. This is handy for linking the
/// archive into another module based on unresolved symbols. Note that the
/// ModuleProvider returned by this accessor should not be deleted by the
- /// caller. It is managed internally by the Archive class. It is possible
+ /// caller. It is managed internally by the Archive class. It is possible
/// that multiple calls to this accessor will return the same ModuleProvider
- /// instance because the associated module defines multiple symbols.
- /// @returns The ModuleProvider* found or null if the archive does not
+ /// instance because the associated module defines multiple symbols.
+ /// @returns The ModuleProvider* found or null if the archive does not
/// contain a module that defines the \p symbol.
/// @brief Look up a module by symbol name.
ModuleProvider* findModuleDefiningSymbol(
@@ -402,10 +402,10 @@
);
/// This method is similar to findModuleDefiningSymbol but allows lookup of
- /// more than one symbol at a time. If \p symbols contains a list of
- /// undefined symbols in some module, then calling this method is like
+ /// more than one symbol at a time. If \p symbols contains a list of
+ /// undefined symbols in some module, then calling this method is like
/// making one complete pass through the archive to resolve symbols but is
- /// more efficient than looking at the individual members. Note that on
+ /// more efficient than looking at the individual members. Note that on
/// exit, the symbols resolved by this method will be removed from \p
/// symbols to ensure they are not re-searched on a subsequent call. If
/// you need to retain the list of symbols, make a copy.
@@ -414,11 +414,11 @@
std::set<std::string>& symbols, ///< Symbols to be sought
std::set<ModuleProvider*>& modules ///< The modules matching \p symbols
);
-
- /// This method determines whether the archive is a properly formed llvm
- /// bytecode 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,
+
+ /// This method determines whether the archive is a properly formed llvm
+ /// bytecode 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,
/// 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.
@@ -428,15 +428,15 @@
/// @name Mutators
/// @{
public:
- /// This method is the only way to get the archive written to disk. It
+ /// 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
- /// and a symbol table of the externally visible function and global
+ /// 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
- /// name will be truncated at 15 characters. If \p Compress is specified,
- /// all archive members will be compressed before being written. If
+ /// archive members will have their path component stripped and the file
+ /// name will be truncated at 15 characters. If \p Compress is specified,
+ /// all archive members will be compressed before being written. If
/// \p PrintSymTab is true, the symbol table will be printed to std::cout.
/// @throws std::string if an error occurs
/// @brief Write (possibly modified) archive contents to disk
@@ -449,7 +449,7 @@
/// This method adds a new file to the archive. The \p filename is examined
/// to determine just enough information to create an ArchiveMember object
/// which is then inserted into the Archive object's ilist at the location
- /// given by \p where.
+ /// given by \p where.
/// @throws std::string if an error occurs reading the \p filename.
/// @returns nothing
/// @brief Add a file to the archive.
@@ -459,7 +459,7 @@
/// @name Implementation
/// @{
protected:
- /// @brief Construct an Archive for \p filename and optionally map it
+ /// @brief Construct an Archive for \p filename and optionally map it
/// into memory.
Archive(const sys::Path& filename, bool map = false );
@@ -486,14 +486,14 @@
bool CreateSymbolTable, bool TruncateNames, bool ShouldCompress);
/// @brief Fill in an ArchiveMemberHeader from ArchiveMember.
- bool fillHeader(const ArchiveMember&mbr,
+ bool fillHeader(const ArchiveMember&mbr,
ArchiveMemberHeader& hdr,int sz, bool TruncateNames) const;
-
+
/// This type is used to keep track of bytecode modules loaded from the
/// symbol table. It maps the file offset to a pair that consists of the
- /// associated ArchiveMember and the ModuleProvider.
+ /// associated ArchiveMember and the ModuleProvider.
/// @brief Module mapping type
- typedef std::map<unsigned,std::pair<ModuleProvider*,ArchiveMember*> >
+ typedef std::map<unsigned,std::pair<ModuleProvider*,ArchiveMember*> >
ModuleMap;
/// @}
Index: llvm/include/llvm/Bytecode/BytecodeHandler.h
diff -u llvm/include/llvm/Bytecode/BytecodeHandler.h:1.7 llvm/include/llvm/Bytecode/BytecodeHandler.h:1.8
--- llvm/include/llvm/Bytecode/BytecodeHandler.h:1.7 Sat Aug 21 15:41:12 2004
+++ llvm/include/llvm/Bytecode/BytecodeHandler.h Thu Apr 21 15:34:13 2005
@@ -1,10 +1,10 @@
//===-- BytecodeHandler.h - Handle Bytecode Parsing Events ------*- C++ -*-===//
-//
+//
// The LLVM Compiler Infrastructure
//
-// This file was developed by Reid Spencer and is distributed under the
+// This file was developed by Reid Spencer and is distributed under the
// University of Illinois Open Source License. See LICENSE.TXT for details.
-//
+//
//===----------------------------------------------------------------------===//
//
// This header file defines the interface to the Bytecode Handler. The handler
@@ -28,11 +28,11 @@
class Module;
/// This class provides the interface for handling bytecode events during
-/// reading of bytecode. The methods on this interface are invoked by the
-/// BytecodeReader as it discovers the content of a bytecode stream.
-/// This class provides a a clear separation of concerns between recognizing
-/// the semantic units of a bytecode file (the Reader) and deciding what to do
-/// with them (the Handler).
+/// reading of bytecode. The methods on this interface are invoked by the
+/// BytecodeReader as it discovers the content of a bytecode stream.
+/// This class provides a a clear separation of concerns between recognizing
+/// the semantic units of a bytecode file (the Reader) and deciding what to do
+/// with them (the Handler).
///
/// The BytecodeReader recognizes the content of the bytecode file and
/// calls the BytecodeHandler methods to let it perform additional tasks. This
@@ -40,7 +40,7 @@
/// purposes simply by creating a subclass of BytecodeHandler. None of the
/// parsing details need to be understood, only the meaning of the calls
/// made on this interface.
-///
+///
/// @see BytecodeHandler
/// @brief Handle Bytecode Parsing Events
class BytecodeHandler {
@@ -64,8 +64,8 @@
/// This method is called whenever the parser detects an error in the
/// bytecode formatting. It gives the handler a chance to do something
- /// with the error message before the parser throws an exception to
- /// terminate the parsing.
+ /// with the error message before the parser throws an exception to
+ /// terminate the parsing.
/// @brief Handle parsing errors.
virtual void handleError(const std::string& str ) {}
@@ -91,8 +91,8 @@
const std::string& moduleId ///< An identifier for the module
) {}
- /// This method is called once the version information has been parsed. It
- /// provides the information about the version of the bytecode file being
+ /// This method is called once the version information has been parsed. It
+ /// provides the information about the version of the bytecode file being
/// read.
/// @brief Handle the bytecode prolog
virtual void handleVersionInfo(
@@ -105,10 +105,10 @@
/// contains the global variables and the function placeholders
virtual void handleModuleGlobalsBegin() {}
- /// This method is called when a non-initialized global variable is
+ /// This method is called when a non-initialized global variable is
/// recognized. Its type, constness, and linkage type are provided.
/// @brief Handle a non-initialized global variable
- virtual void handleGlobalVariable(
+ virtual void handleGlobalVariable(
const Type* ElemType, ///< The type of the global variable
bool isConstant, ///< Whether the GV is constant or not
GlobalValue::LinkageTypes,///< The linkage type of the GV
@@ -120,20 +120,20 @@
/// provides the number of types that the list contains. The handler
/// should expect that number of calls to handleType.
/// @brief Handle a type
- virtual void handleTypeList(
+ virtual void handleTypeList(
unsigned numEntries ///< The number of entries in the type list
) {}
- /// This method is called when a new type is recognized. The type is
+ /// This method is called when a new type is recognized. The type is
/// converted from the bytecode and passed to this method.
/// @brief Handle a type
- virtual void handleType(
+ virtual void handleType(
const Type* Ty ///< The type that was just recognized
) {}
/// This method is called when the function prototype for a function is
/// encountered in the module globals block.
- virtual void handleFunctionDeclaration(
+ virtual void handleFunctionDeclaration(
Function* Func ///< The function being declared
) {}
@@ -146,7 +146,7 @@
/// in the module globals block.
virtual void handleDependentLibrary(const std::string& libName) {}
- /// This method is called if the module globals has a non-empty target
+ /// This method is called if the module globals has a non-empty target
/// triple
virtual void handleTargetTriple(const std::string& triple) {}
@@ -159,13 +159,13 @@
virtual void handleCompactionTableBegin() {}
/// @brief Handle start of a compaction table plane
- virtual void handleCompactionTablePlane(
+ virtual void handleCompactionTablePlane(
unsigned Ty, ///< The type of the plane (slot number)
unsigned NumEntries ///< The number of entries in the plane
) {}
/// @brief Handle a type entry in the compaction table
- virtual void handleCompactionTableType(
+ virtual void handleCompactionTableType(
unsigned i, ///< Index in the plane of this type
unsigned TypSlot, ///< Slot number for this type
const Type* ///< The type referenced by this slot
@@ -182,27 +182,27 @@
virtual void handleCompactionTableEnd() {}
/// @brief Handle start of a symbol table
- virtual void handleSymbolTableBegin(
+ virtual void handleSymbolTableBegin(
Function* Func, ///< The function to which the ST belongs
SymbolTable* ST ///< The symbol table being filled
) {}
/// @brief Handle start of a symbol table plane
- virtual void handleSymbolTablePlane(
+ virtual void handleSymbolTablePlane(
unsigned TySlot, ///< The slotnum of the type plane
unsigned NumEntries, ///< Number of entries in the plane
const Type* Typ ///< The type of this type plane
) {}
/// @brief Handle a named type in the symbol table
- virtual void handleSymbolTableType(
+ virtual void handleSymbolTableType(
unsigned i, ///< The index of the type in this plane
unsigned slot, ///< Slot number of the named type
const std::string& name ///< Name of the type
) {}
/// @brief Handle a named value in the symbol table
- virtual void handleSymbolTableValue(
+ virtual void handleSymbolTableValue(
unsigned i, ///< The index of the value in this plane
unsigned slot, ///< Slot number of the named value
const std::string& name ///< Name of the value.
@@ -227,7 +227,7 @@
unsigned blocknum ///< The block number of the block
) {}
- /// This method is called for each instruction that is parsed.
+ /// This method is called for each instruction that is parsed.
/// @returns true if the instruction is a block terminating instruction
/// @brief Handle an instruction
virtual bool handleInstruction(
@@ -246,29 +246,29 @@
virtual void handleGlobalConstantsBegin() {}
/// @brief Handle a constant expression
- virtual void handleConstantExpression(
+ virtual void handleConstantExpression(
unsigned Opcode, ///< Opcode of primary expression operator
std::vector<Constant*> ArgVec, ///< expression args
Constant* C ///< The constant value
) {}
/// @brief Handle a constant array
- virtual void handleConstantArray(
+ virtual void handleConstantArray(
const ArrayType* AT, ///< Type of the array
std::vector<Constant*>& ElementSlots,///< Slot nums for array values
unsigned TypeSlot, ///< Slot # of type
Constant* Val ///< The constant value
) {}
- /// @brief Handle a constant structure
- virtual void handleConstantStruct(
+ /// @brief Handle a constant structure
+ virtual void handleConstantStruct(
const StructType* ST, ///< Type of the struct
std::vector<Constant*>& ElementSlots,///< Slot nums for struct values
Constant* Val ///< The constant value
) {}
/// @brief Handle a constant packed
- virtual void handleConstantPacked(
+ virtual void handleConstantPacked(
const PackedType* PT, ///< Type of the array
std::vector<Constant*>& ElementSlots,///< Slot nums for packed values
unsigned TypeSlot, ///< Slot # of type
@@ -276,7 +276,7 @@
) {}
/// @brief Handle a constant pointer
- virtual void handleConstantPointer(
+ virtual void handleConstantPointer(
const PointerType* PT, ///< Type of the pointer
unsigned Slot, ///< Slot num of initializer value
GlobalValue* GV ///< Referenced global value
@@ -288,7 +288,7 @@
) {}
/// @brief Handle a primitive constant value
- virtual void handleConstantValue(
+ virtual void handleConstantValue(
Constant * c ///< The constant just defined
) {}
Index: llvm/include/llvm/Bytecode/Format.h
diff -u llvm/include/llvm/Bytecode/Format.h:1.11 llvm/include/llvm/Bytecode/Format.h:1.12
--- llvm/include/llvm/Bytecode/Format.h:1.11 Sat Aug 21 15:42:28 2004
+++ llvm/include/llvm/Bytecode/Format.h Thu Apr 21 15:34:13 2005
@@ -1,13 +1,13 @@
//===-- llvm/Bytecode/Format.h - VM bytecode file format info ---*- C++ -*-===//
-//
+//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
+//
//===----------------------------------------------------------------------===//
//
-// This header defines intrinsic constants that are useful to libraries that
+// This header defines intrinsic constants that are useful to libraries that
// need to hack on bytecode files directly, like the reader and writer.
//
//===----------------------------------------------------------------------===//
@@ -51,9 +51,9 @@
};
/// In LLVM 1.3 format, the identifier and the size of the block are
- /// encoded into a single vbr_uint32 with 5 bits for the block identifier
- /// and 27-bits for block length. This limits blocks to a maximum of
- /// 128MBytes of data, and block types to 31 which should be sufficient
+ /// encoded into a single vbr_uint32 with 5 bits for the block identifier
+ /// and 27-bits for block length. This limits blocks to a maximum of
+ /// 128MBytes of data, and block types to 31 which should be sufficient
/// for the foreseeable usage. Because the values of block identifiers MUST
/// fit within 5 bits (values 1-31), this enumeration is used to ensure
/// smaller values are used for 1.3 and subsequent bytecode versions.
@@ -80,7 +80,7 @@
// InstructionList - The instructions in the body of a function. This
// superceeds the old BasicBlock node used in LLVM 1.0.
- InstructionListBlockID = 0x07, ///< 1.3 identifier for insruction list
+ InstructionListBlockID = 0x07, ///< 1.3 identifier for insruction list
// CompactionTable - blocks with this id are used to define local remapping
// tables for a function, allowing the indices used within the function to
Index: llvm/include/llvm/Bytecode/Reader.h
diff -u llvm/include/llvm/Bytecode/Reader.h:1.23 llvm/include/llvm/Bytecode/Reader.h:1.24
--- llvm/include/llvm/Bytecode/Reader.h:1.23 Mon Nov 15 15:27:05 2004
+++ llvm/include/llvm/Bytecode/Reader.h Thu Apr 21 15:34:13 2005
@@ -1,10 +1,10 @@
//===-- llvm/Bytecode/Reader.h - Reader for VM bytecode files ---*- C++ -*-===//
-//
+//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
+//
//===----------------------------------------------------------------------===//
//
// This functionality is implemented by the lib/Bytecode/Reader library.
@@ -60,21 +60,21 @@
/// dependent libraries.
/// @returns true on success, false otherwise
/// @brief Get the list of dependent libraries from a bytecode file.
-bool GetBytecodeDependentLibraries(const std::string &fileName,
+bool GetBytecodeDependentLibraries(const std::string &fileName,
Module::LibraryListType& deplibs);
/// This function will read only the necessary parts of a bytecode file in order
/// to obtain a list of externally visible global symbols that the bytecode
-/// module defines. This is used for archiving and linking when only the list
+/// module defines. This is used for archiving and linking when only the list
/// of symbols the module defines is needed.
/// @returns true on success, false otherwise
/// @brief Get a bytecode file's externally visibile defined global symbols.
-bool GetBytecodeSymbols(const sys::Path& fileName,
+bool GetBytecodeSymbols(const sys::Path& fileName,
std::vector<std::string>& syms);
/// This function will read only the necessary parts of a bytecode buffer in
-/// order to obtain a list of externally visible global symbols that the
-/// bytecode module defines. This is used for archiving and linking when only
+/// order to obtain a list of externally visible global symbols that the
+/// bytecode module defines. This is used for archiving and linking when only
/// the list of symbols the module defines is needed and the bytecode is
/// already in memory.
/// @returns the ModuleProvider on success, 0 if the bytecode can't be parsed
Index: llvm/include/llvm/Bytecode/WriteBytecodePass.h
diff -u llvm/include/llvm/Bytecode/WriteBytecodePass.h:1.14 llvm/include/llvm/Bytecode/WriteBytecodePass.h:1.15
--- llvm/include/llvm/Bytecode/WriteBytecodePass.h:1.14 Mon Nov 8 13:01:03 2004
+++ llvm/include/llvm/Bytecode/WriteBytecodePass.h Thu Apr 21 15:34:13 2005
@@ -1,10 +1,10 @@
//===- llvm/Bytecode/WriteBytecodePass.h - Bytecode Writer Pass -*- C++ -*-===//
-//
+//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
+//
//===----------------------------------------------------------------------===//
//
// This file defines a simple pass to write the working module to a file after
@@ -26,15 +26,15 @@
bool DeleteStream;
bool CompressFile;
public:
- WriteBytecodePass()
+ WriteBytecodePass()
: Out(&std::cout), DeleteStream(false), CompressFile(true) {}
- WriteBytecodePass(std::ostream *o, bool DS = false, bool CF = true)
+ WriteBytecodePass(std::ostream *o, bool DS = false, bool CF = true)
: Out(o), DeleteStream(DS), CompressFile(CF) {}
inline ~WriteBytecodePass() {
if (DeleteStream) delete Out;
}
-
+
bool runOnModule(Module &M) {
WriteBytecodeToFile(&M, *Out, CompressFile );
return false;
Index: llvm/include/llvm/Bytecode/Writer.h
diff -u llvm/include/llvm/Bytecode/Writer.h:1.8 llvm/include/llvm/Bytecode/Writer.h:1.9
--- llvm/include/llvm/Bytecode/Writer.h:1.8 Sun Nov 7 12:18:11 2004
+++ llvm/include/llvm/Bytecode/Writer.h Thu Apr 21 15:34:13 2005
@@ -1,10 +1,10 @@
//===-- llvm/Bytecode/Writer.h - Writer for VM bytecode files ---*- C++ -*-===//
-//
+//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
+//
//===----------------------------------------------------------------------===//
//
// This functionality is implemented by the lib/BytecodeWriter library.
@@ -28,7 +28,7 @@
namespace llvm {
class Module;
- void WriteBytecodeToFile(const Module *M, std::ostream &Out,
+ void WriteBytecodeToFile(const Module *M, std::ostream &Out,
bool compress = true);
} // End llvm namespace
More information about the llvm-commits
mailing list