Unindent namespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202918 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher 2014-03-05 00:43:41 +00:00
parent 64da21dd5a
commit 9ad8924df3

View File

@ -39,6 +39,7 @@ namespace llvm {
/// Form - Dwarf form code.
///
dwarf::Form Form;
public:
DIEAbbrevData(dwarf::Attribute A, dwarf::Form F) : Attribute(A), Form(F) {}
@ -158,8 +159,7 @@ namespace llvm {
/// addValue - Add a value and attributes to a DIE.
///
void addValue(dwarf::Attribute Attribute, dwarf::Form Form,
DIEValue *Value) {
void addValue(dwarf::Attribute Attribute, dwarf::Form Form, DIEValue *Value) {
Abbrev.AddAttribute(Attribute, Form);
Values.push_back(Value);
}
@ -188,6 +188,7 @@ namespace llvm {
///
class DIEValue {
virtual void anchor();
public:
enum {
isInteger,
@ -200,10 +201,12 @@ namespace llvm {
isBlock,
isLoc
};
protected:
/// Type - Type of data stored in the value.
///
unsigned Type;
public:
explicit DIEValue(unsigned T) : Type(T) {}
virtual ~DIEValue() {}
@ -230,6 +233,7 @@ namespace llvm {
///
class DIEInteger : public DIEValue {
uint64_t Integer;
public:
explicit DIEInteger(uint64_t I) : DIEValue(isInteger), Integer(I) {}
@ -238,13 +242,19 @@ namespace llvm {
static dwarf::Form BestForm(bool IsSigned, uint64_t Int) {
if (IsSigned) {
const int64_t SignedInt = Int;
if ((char)Int == SignedInt) return dwarf::DW_FORM_data1;
if ((short)Int == SignedInt) return dwarf::DW_FORM_data2;
if ((int)Int == SignedInt) return dwarf::DW_FORM_data4;
if ((char)Int == SignedInt)
return dwarf::DW_FORM_data1;
if ((short)Int == SignedInt)
return dwarf::DW_FORM_data2;
if ((int)Int == SignedInt)
return dwarf::DW_FORM_data4;
} else {
if ((unsigned char)Int == Int) return dwarf::DW_FORM_data1;
if ((unsigned short)Int == Int) return dwarf::DW_FORM_data2;
if ((unsigned int)Int == Int) return dwarf::DW_FORM_data4;
if ((unsigned char)Int == Int)
return dwarf::DW_FORM_data1;
if ((unsigned short)Int == Int)
return dwarf::DW_FORM_data2;
if ((unsigned int)Int == Int)
return dwarf::DW_FORM_data4;
}
return dwarf::DW_FORM_data8;
}
@ -272,6 +282,7 @@ namespace llvm {
//
class DIEExpr : public DIEValue {
const MCExpr *Expr;
public:
explicit DIEExpr(const MCExpr *E) : DIEValue(isExpr), Expr(E) {}
@ -300,6 +311,7 @@ namespace llvm {
//
class DIELabel : public DIEValue {
const MCSymbol *Label;
public:
explicit DIELabel(const MCSymbol *L) : DIEValue(isLabel), Label(L) {}
@ -329,6 +341,7 @@ namespace llvm {
class DIEDelta : public DIEValue {
const MCSymbol *LabelHi;
const MCSymbol *LabelLo;
public:
DIEDelta(const MCSymbol *Hi, const MCSymbol *Lo)
: DIEValue(isDelta), LabelHi(Hi), LabelLo(Lo) {}
@ -385,6 +398,7 @@ namespace llvm {
/// yet defined (ie. types.)
class DIEEntry : public DIEValue {
DIE *const Entry;
public:
explicit DIEEntry(DIE *E) : DIEValue(isEntry), Entry(E) {
assert(E && "Cannot construct a DIEEntry with a null DIE");
@ -418,6 +432,7 @@ namespace llvm {
/// \brief A signature reference to a type unit.
class DIETypeSignature : public DIEValue {
const DwarfTypeUnit &Unit;
public:
explicit DIETypeSignature(const DwarfTypeUnit &Unit)
: DIEValue(isTypeSignature), Unit(Unit) {}
@ -456,11 +471,15 @@ namespace llvm {
/// BestForm - Choose the best form for data.
///
dwarf::Form BestForm(unsigned DwarfVersion) const {
if (DwarfVersion > 3) return dwarf::DW_FORM_exprloc;
if (DwarfVersion > 3)
return dwarf::DW_FORM_exprloc;
// Pre-DWARF4 location expressions were blocks and not exprloc.
if ((unsigned char)Size == Size) return dwarf::DW_FORM_block1;
if ((unsigned short)Size == Size) return dwarf::DW_FORM_block2;
if ((unsigned int)Size == Size) return dwarf::DW_FORM_block4;
if ((unsigned char)Size == Size)
return dwarf::DW_FORM_block1;
if ((unsigned short)Size == Size)
return dwarf::DW_FORM_block2;
if ((unsigned int)Size == Size)
return dwarf::DW_FORM_block4;
return dwarf::DW_FORM_block;
}
@ -495,9 +514,12 @@ namespace llvm {
/// BestForm - Choose the best form for data.
///
dwarf::Form BestForm() const {
if ((unsigned char)Size == Size) return dwarf::DW_FORM_block1;
if ((unsigned short)Size == Size) return dwarf::DW_FORM_block2;
if ((unsigned int)Size == Size) return dwarf::DW_FORM_block4;
if ((unsigned char)Size == Size)
return dwarf::DW_FORM_block1;
if ((unsigned short)Size == Size)
return dwarf::DW_FORM_block2;
if ((unsigned int)Size == Size)
return dwarf::DW_FORM_block4;
return dwarf::DW_FORM_block;
}