Tidy up. Trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156601 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2012-05-11 01:39:13 +00:00
parent 5b6dfee28e
commit 639aa87bee
8 changed files with 55 additions and 55 deletions

View File

@ -12,7 +12,7 @@
#include "llvm/Support/DataTypes.h" #include "llvm/Support/DataTypes.h"
namespace llvm { namespace llvm {
#define EDIS_MAX_OPERANDS 13 #define EDIS_MAX_OPERANDS 13
#define EDIS_MAX_SYNTAXES 2 #define EDIS_MAX_SYNTAXES 2
@ -23,7 +23,7 @@ struct EDInstInfo {
uint8_t operandFlags[EDIS_MAX_OPERANDS]; uint8_t operandFlags[EDIS_MAX_OPERANDS];
const signed char operandOrders[EDIS_MAX_SYNTAXES][EDIS_MAX_OPERANDS]; const signed char operandOrders[EDIS_MAX_SYNTAXES][EDIS_MAX_OPERANDS];
}; };
} // namespace llvm } // namespace llvm
#endif #endif

View File

@ -13,13 +13,13 @@
#include "llvm-c/Disassembler.h" #include "llvm-c/Disassembler.h"
namespace llvm { namespace llvm {
class MCInst; class MCInst;
class MCSubtargetInfo; class MCSubtargetInfo;
class MemoryObject; class MemoryObject;
class raw_ostream; class raw_ostream;
class MCContext; class MCContext;
struct EDInstInfo; struct EDInstInfo;
/// MCDisassembler - Superclass for all disassemblers. Consumes a memory region /// MCDisassembler - Superclass for all disassemblers. Consumes a memory region
@ -58,12 +58,12 @@ public:
MCDisassembler(const MCSubtargetInfo &STI) : GetOpInfo(0), SymbolLookUp(0), MCDisassembler(const MCSubtargetInfo &STI) : GetOpInfo(0), SymbolLookUp(0),
DisInfo(0), Ctx(0), DisInfo(0), Ctx(0),
STI(STI), CommentStream(0) {} STI(STI), CommentStream(0) {}
virtual ~MCDisassembler(); virtual ~MCDisassembler();
/// getInstruction - Returns the disassembly of a single instruction. /// getInstruction - Returns the disassembly of a single instruction.
/// ///
/// @param instr - An MCInst to populate with the contents of the /// @param instr - An MCInst to populate with the contents of the
/// instruction. /// instruction.
/// @param size - A value to populate with the size of the instruction, or /// @param size - A value to populate with the size of the instruction, or
/// the number of bytes consumed while attempting to decode /// the number of bytes consumed while attempting to decode
@ -74,7 +74,7 @@ public:
/// @param vStream - The stream to print warnings and diagnostic messages on. /// @param vStream - The stream to print warnings and diagnostic messages on.
/// @param cStream - The stream to print comments and annotations on. /// @param cStream - The stream to print comments and annotations on.
/// @return - MCDisassembler::Success if the instruction is valid, /// @return - MCDisassembler::Success if the instruction is valid,
/// MCDisassembler::SoftFail if the instruction was /// MCDisassembler::SoftFail if the instruction was
/// disassemblable but invalid, /// disassemblable but invalid,
/// MCDisassembler::Fail if the instruction was invalid. /// MCDisassembler::Fail if the instruction was invalid.
virtual DecodeStatus getInstruction(MCInst& instr, virtual DecodeStatus getInstruction(MCInst& instr,

View File

@ -194,7 +194,7 @@ public:
VK_Mips_GPOFF_LO, VK_Mips_GPOFF_LO,
VK_Mips_GOT_DISP, VK_Mips_GOT_DISP,
VK_Mips_GOT_PAGE, VK_Mips_GOT_PAGE,
VK_Mips_GOT_OFST VK_Mips_GOT_OFST
}; };
private: private:

View File

@ -18,7 +18,7 @@ struct MCFixupKindInfo {
/// Is this fixup kind PCrelative? This is used by the assembler backend to /// Is this fixup kind PCrelative? This is used by the assembler backend to
/// evaluate fixup values in a target independent manner when possible. /// evaluate fixup values in a target independent manner when possible.
FKF_IsPCRel = (1 << 0), FKF_IsPCRel = (1 << 0),
/// Should this fixup kind force a 4-byte aligned effective PC value? /// Should this fixup kind force a 4-byte aligned effective PC value?
FKF_IsAlignedDownTo32Bits = (1 << 1) FKF_IsAlignedDownTo32Bits = (1 << 1)
}; };

View File

@ -22,17 +22,17 @@ namespace llvm {
class StringRef; class StringRef;
class Triple; class Triple;
class MCObjectFileInfo { class MCObjectFileInfo {
protected: protected:
/// CommDirectiveSupportsAlignment - True if .comm supports alignment. This /// CommDirectiveSupportsAlignment - True if .comm supports alignment. This
/// is a hack for as long as we support 10.4 Tiger, whose assembler doesn't /// is a hack for as long as we support 10.4 Tiger, whose assembler doesn't
/// support alignment on comm. /// support alignment on comm.
bool CommDirectiveSupportsAlignment; bool CommDirectiveSupportsAlignment;
/// SupportsWeakEmptyEHFrame - True if target object file supports a /// SupportsWeakEmptyEHFrame - True if target object file supports a
/// weak_definition of constant 0 for an omitted EH frame. /// weak_definition of constant 0 for an omitted EH frame.
bool SupportsWeakOmittedEHFrame; bool SupportsWeakOmittedEHFrame;
/// IsFunctionEHFrameSymbolPrivate - This flag is set to true if the /// IsFunctionEHFrameSymbolPrivate - This flag is set to true if the
/// "EH_frame" symbol for EH information should be an assembler temporary (aka /// "EH_frame" symbol for EH information should be an assembler temporary (aka
/// private linkage, aka an L or .L label) or false if it should be a normal /// private linkage, aka an L or .L label) or false if it should be a normal
@ -53,20 +53,20 @@ protected:
/// TextSection - Section directive for standard text. /// TextSection - Section directive for standard text.
/// ///
const MCSection *TextSection; const MCSection *TextSection;
/// DataSection - Section directive for standard data. /// DataSection - Section directive for standard data.
/// ///
const MCSection *DataSection; const MCSection *DataSection;
/// BSSSection - Section that is default initialized to zero. /// BSSSection - Section that is default initialized to zero.
const MCSection *BSSSection; const MCSection *BSSSection;
/// ReadOnlySection - Section that is readonly and can contain arbitrary /// ReadOnlySection - Section that is readonly and can contain arbitrary
/// initialized data. Targets are not required to have a readonly section. /// initialized data. Targets are not required to have a readonly section.
/// If they don't, various bits of code will fall back to using the data /// If they don't, various bits of code will fall back to using the data
/// section for constants. /// section for constants.
const MCSection *ReadOnlySection; const MCSection *ReadOnlySection;
/// StaticCtorSection - This section contains the static constructor pointer /// StaticCtorSection - This section contains the static constructor pointer
/// list. /// list.
const MCSection *StaticCtorSection; const MCSection *StaticCtorSection;
@ -74,7 +74,7 @@ protected:
/// StaticDtorSection - This section contains the static destructor pointer /// StaticDtorSection - This section contains the static destructor pointer
/// list. /// list.
const MCSection *StaticDtorSection; const MCSection *StaticDtorSection;
/// LSDASection - If exception handling is supported by the target, this is /// LSDASection - If exception handling is supported by the target, this is
/// the section the Language Specific Data Area information is emitted to. /// the section the Language Specific Data Area information is emitted to.
const MCSection *LSDASection; const MCSection *LSDASection;
@ -109,7 +109,7 @@ protected:
// Extra TLS Variable Data section. If the target needs to put additional // Extra TLS Variable Data section. If the target needs to put additional
// information for a TLS variable, it'll go here. // information for a TLS variable, it'll go here.
const MCSection *TLSExtraDataSection; const MCSection *TLSExtraDataSection;
/// TLSDataSection - Section directive for Thread Local data. /// TLSDataSection - Section directive for Thread Local data.
/// ELF, MachO and COFF. /// ELF, MachO and COFF.
const MCSection *TLSDataSection; // Defaults to ".tdata". const MCSection *TLSDataSection; // Defaults to ".tdata".
@ -141,11 +141,11 @@ protected:
/// Contains the source code name of the variable, visibility and a pointer /// Contains the source code name of the variable, visibility and a pointer
/// to the initial value (.tdata or .tbss). /// to the initial value (.tdata or .tbss).
const MCSection *TLSTLVSection; // Defaults to ".tlv". const MCSection *TLSTLVSection; // Defaults to ".tlv".
/// TLSThreadInitSection - Section for thread local data initialization /// TLSThreadInitSection - Section for thread local data initialization
/// functions. /// functions.
const MCSection *TLSThreadInitSection; // Defaults to ".thread_init_func". const MCSection *TLSThreadInitSection; // Defaults to ".thread_init_func".
const MCSection *CStringSection; const MCSection *CStringSection;
const MCSection *UStringSection; const MCSection *UStringSection;
const MCSection *TextCoalSection; const MCSection *TextCoalSection;
@ -169,7 +169,7 @@ protected:
public: public:
void InitMCObjectFileInfo(StringRef TT, Reloc::Model RM, CodeModel::Model CM, void InitMCObjectFileInfo(StringRef TT, Reloc::Model RM, CodeModel::Model CM,
MCContext &ctx); MCContext &ctx);
bool isFunctionEHFrameSymbolPrivate() const { bool isFunctionEHFrameSymbolPrivate() const {
return IsFunctionEHFrameSymbolPrivate; return IsFunctionEHFrameSymbolPrivate;
} }

View File

@ -14,72 +14,72 @@
namespace llvm { namespace llvm {
class Target; class Target;
/// MCTargetAsmLexer - Generic interface to target specific assembly lexers. /// MCTargetAsmLexer - Generic interface to target specific assembly lexers.
class MCTargetAsmLexer { class MCTargetAsmLexer {
/// The current token /// The current token
AsmToken CurTok; AsmToken CurTok;
/// The location and description of the current error /// The location and description of the current error
SMLoc ErrLoc; SMLoc ErrLoc;
std::string Err; std::string Err;
MCTargetAsmLexer(const MCTargetAsmLexer &); // DO NOT IMPLEMENT MCTargetAsmLexer(const MCTargetAsmLexer &); // DO NOT IMPLEMENT
void operator=(const MCTargetAsmLexer &); // DO NOT IMPLEMENT void operator=(const MCTargetAsmLexer &); // DO NOT IMPLEMENT
protected: // Can only create subclasses. protected: // Can only create subclasses.
MCTargetAsmLexer(const Target &); MCTargetAsmLexer(const Target &);
virtual AsmToken LexToken() = 0; virtual AsmToken LexToken() = 0;
void SetError(const SMLoc &errLoc, const std::string &err) { void SetError(const SMLoc &errLoc, const std::string &err) {
ErrLoc = errLoc; ErrLoc = errLoc;
Err = err; Err = err;
} }
/// TheTarget - The Target that this machine was created for. /// TheTarget - The Target that this machine was created for.
const Target &TheTarget; const Target &TheTarget;
MCAsmLexer *Lexer; MCAsmLexer *Lexer;
public: public:
virtual ~MCTargetAsmLexer(); virtual ~MCTargetAsmLexer();
const Target &getTarget() const { return TheTarget; } const Target &getTarget() const { return TheTarget; }
/// InstallLexer - Set the lexer to get tokens from lower-level lexer \arg L. /// InstallLexer - Set the lexer to get tokens from lower-level lexer \arg L.
void InstallLexer(MCAsmLexer &L) { void InstallLexer(MCAsmLexer &L) {
Lexer = &L; Lexer = &L;
} }
MCAsmLexer *getLexer() { MCAsmLexer *getLexer() {
return Lexer; return Lexer;
} }
/// Lex - Consume the next token from the input stream and return it. /// Lex - Consume the next token from the input stream and return it.
const AsmToken &Lex() { const AsmToken &Lex() {
return CurTok = LexToken(); return CurTok = LexToken();
} }
/// getTok - Get the current (last) lexed token. /// getTok - Get the current (last) lexed token.
const AsmToken &getTok() { const AsmToken &getTok() {
return CurTok; return CurTok;
} }
/// getErrLoc - Get the current error location /// getErrLoc - Get the current error location
const SMLoc &getErrLoc() { const SMLoc &getErrLoc() {
return ErrLoc; return ErrLoc;
} }
/// getErr - Get the current error string /// getErr - Get the current error string
const std::string &getErr() { const std::string &getErr() {
return Err; return Err;
} }
/// getKind - Get the kind of current token. /// getKind - Get the kind of current token.
AsmToken::TokenKind getKind() const { return CurTok.getKind(); } AsmToken::TokenKind getKind() const { return CurTok.getKind(); }
/// is - Check if the current token has kind \arg K. /// is - Check if the current token has kind \arg K.
bool is(AsmToken::TokenKind K) const { return CurTok.is(K); } bool is(AsmToken::TokenKind K) const { return CurTok.is(K); }
/// isNot - Check if the current token has kind \arg K. /// isNot - Check if the current token has kind \arg K.
bool isNot(AsmToken::TokenKind K) const { return CurTok.isNot(K); } bool isNot(AsmToken::TokenKind K) const { return CurTok.isNot(K); }
}; };

View File

@ -11,7 +11,7 @@
// from a base address plus an offset. Register indirection can be specified by // from a base address plus an offset. Register indirection can be specified by
// using an offset of zero. // using an offset of zero.
// //
// The MachineMove class is used to represent abstract move operations in the // The MachineMove class is used to represent abstract move operations in the
// prolog/epilog of a compiled function. A collection of these objects can be // prolog/epilog of a compiled function. A collection of these objects can be
// used by a debug consumer to track the location of values when unwinding stack // used by a debug consumer to track the location of values when unwinding stack
// frames. // frames.
@ -23,7 +23,7 @@
namespace llvm { namespace llvm {
class MCSymbol; class MCSymbol;
class MachineLocation { class MachineLocation {
private: private:
bool IsRegister; // True if location is a register. bool IsRegister; // True if location is a register.
@ -46,7 +46,7 @@ public:
return IsRegister == Other.IsRegister && Register == Other.Register && return IsRegister == Other.IsRegister && Register == Other.Register &&
Offset == Other.Offset; Offset == Other.Offset;
} }
// Accessors // Accessors
bool isReg() const { return IsRegister; } bool isReg() const { return IsRegister; }
unsigned getReg() const { return Register; } unsigned getReg() const { return Register; }
@ -77,7 +77,7 @@ private:
/// Label - Symbol for post-instruction address when result of move takes /// Label - Symbol for post-instruction address when result of move takes
/// effect. /// effect.
MCSymbol *Label; MCSymbol *Label;
// Move to & from location. // Move to & from location.
MachineLocation Destination, Source; MachineLocation Destination, Source;
public: public:
@ -86,7 +86,7 @@ public:
MachineMove(MCSymbol *label, const MachineLocation &D, MachineMove(MCSymbol *label, const MachineLocation &D,
const MachineLocation &S) const MachineLocation &S)
: Label(label), Destination(D), Source(S) {} : Label(label), Destination(D), Source(S) {}
// Accessors // Accessors
MCSymbol *getLabel() const { return Label; } MCSymbol *getLabel() const { return Label; }
const MachineLocation &getDestination() const { return Destination; } const MachineLocation &getDestination() const { return Destination; }

View File

@ -25,7 +25,7 @@
namespace llvm { namespace llvm {
class raw_ostream; class raw_ostream;
class StringRef; class StringRef;
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
/// ///
/// SubtargetFeatureKV - Used to provide key value pairs for feature and /// SubtargetFeatureKV - Used to provide key value pairs for feature and
@ -36,13 +36,13 @@ struct SubtargetFeatureKV {
const char *Desc; // Help descriptor const char *Desc; // Help descriptor
uint64_t Value; // K-V integer value uint64_t Value; // K-V integer value
uint64_t Implies; // K-V bit mask uint64_t Implies; // K-V bit mask
// Compare routine for std binary search // Compare routine for std binary search
bool operator<(const SubtargetFeatureKV &S) const { bool operator<(const SubtargetFeatureKV &S) const {
return strcmp(Key, S.Key) < 0; return strcmp(Key, S.Key) < 0;
} }
}; };
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
/// ///
/// SubtargetInfoKV - Used to provide key value pairs for CPU and arbitrary /// SubtargetInfoKV - Used to provide key value pairs for CPU and arbitrary
@ -51,16 +51,16 @@ struct SubtargetFeatureKV {
struct SubtargetInfoKV { struct SubtargetInfoKV {
const char *Key; // K-V key string const char *Key; // K-V key string
void *Value; // K-V pointer value void *Value; // K-V pointer value
// Compare routine for std binary search // Compare routine for std binary search
bool operator<(const SubtargetInfoKV &S) const { bool operator<(const SubtargetInfoKV &S) const {
return strcmp(Key, S.Key) < 0; return strcmp(Key, S.Key) < 0;
} }
}; };
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
/// ///
/// SubtargetFeatures - Manages the enabling and disabling of subtarget /// SubtargetFeatures - Manages the enabling and disabling of subtarget
/// specific features. Features are encoded as a string of the form /// specific features. Features are encoded as a string of the form
/// "cpu,+attr1,+attr2,-attr3,...,+attrN" /// "cpu,+attr1,+attr2,-attr3,...,+attrN"
/// A comma separates each feature from the next (all lowercase.) /// A comma separates each feature from the next (all lowercase.)
@ -81,27 +81,27 @@ public:
/// Adding Features. /// Adding Features.
void AddFeature(const StringRef String, bool IsEnabled = true); void AddFeature(const StringRef String, bool IsEnabled = true);
/// ToggleFeature - Toggle a feature and returns the newly updated feature /// ToggleFeature - Toggle a feature and returns the newly updated feature
/// bits. /// bits.
uint64_t ToggleFeature(uint64_t Bits, const StringRef String, uint64_t ToggleFeature(uint64_t Bits, const StringRef String,
const SubtargetFeatureKV *FeatureTable, const SubtargetFeatureKV *FeatureTable,
size_t FeatureTableSize); size_t FeatureTableSize);
/// Get feature bits of a CPU. /// Get feature bits of a CPU.
uint64_t getFeatureBits(const StringRef CPU, uint64_t getFeatureBits(const StringRef CPU,
const SubtargetFeatureKV *CPUTable, const SubtargetFeatureKV *CPUTable,
size_t CPUTableSize, size_t CPUTableSize,
const SubtargetFeatureKV *FeatureTable, const SubtargetFeatureKV *FeatureTable,
size_t FeatureTableSize); size_t FeatureTableSize);
/// Get scheduling itinerary of a CPU. /// Get scheduling itinerary of a CPU.
void *getItinerary(const StringRef CPU, void *getItinerary(const StringRef CPU,
const SubtargetInfoKV *Table, size_t TableSize); const SubtargetInfoKV *Table, size_t TableSize);
/// Print feature string. /// Print feature string.
void print(raw_ostream &OS) const; void print(raw_ostream &OS) const;
// Dump feature info. // Dump feature info.
void dump() const; void dump() const;