summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2016-11-11 18:22:51 +0000
committerAdrian Prantl <aprantl@apple.com>2016-11-11 18:22:51 +0000
commitaa0c77bc7367bedaa6dfc2cc131efe413e5a9030 (patch)
tree1b8ce03aec0babaa11780391f83ccc9a6ee90e8f /include
parentec6378facd9346f09a003e9f5b1639030e0dbba9 (diff)
Fix comments according to the LLVM coding guidelines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286610 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/DIE.h98
1 files changed, 42 insertions, 56 deletions
diff --git a/include/llvm/CodeGen/DIE.h b/include/llvm/CodeGen/DIE.h
index f93dd798025..0436fbfdeba 100644
--- a/include/llvm/CodeGen/DIE.h
+++ b/include/llvm/CodeGen/DIE.h
@@ -39,74 +39,68 @@ class MCSymbol;
class raw_ostream;
//===--------------------------------------------------------------------===//
-/// DIEAbbrevData - Dwarf abbreviation data, describes one attribute of a
-/// Dwarf abbreviation.
+/// Dwarf abbreviation data, describes one attribute of a Dwarf abbreviation.
class DIEAbbrevData {
- /// Attribute - Dwarf attribute code.
- ///
+ /// Dwarf attribute code.
dwarf::Attribute Attribute;
- /// Form - Dwarf form code.
- ///
+ /// Dwarf form code.
dwarf::Form Form;
public:
DIEAbbrevData(dwarf::Attribute A, dwarf::Form F) : Attribute(A), Form(F) {}
- // Accessors.
+ /// Accessors.
+ /// @{
dwarf::Attribute getAttribute() const { return Attribute; }
dwarf::Form getForm() const { return Form; }
+ /// @}
- /// Profile - Used to gather unique data for the abbreviation folding set.
- ///
+ /// Used to gather unique data for the abbreviation folding set.
void Profile(FoldingSetNodeID &ID) const;
};
//===--------------------------------------------------------------------===//
-/// DIEAbbrev - Dwarf abbreviation, describes the organization of a debug
-/// information object.
+/// Dwarf abbreviation, describes the organization of a debug information
+/// object.
class DIEAbbrev : public FoldingSetNode {
/// Unique number for node.
- ///
unsigned Number;
- /// Tag - Dwarf tag code.
- ///
+ /// Dwarf tag code.
dwarf::Tag Tag;
- /// Children - Whether or not this node has children.
+ /// Whether or not this node has children.
///
- // This cheats a bit in all of the uses since the values in the standard
- // are 0 and 1 for no children and children respectively.
+ /// This cheats a bit in all of the uses since the values in the standard
+ /// are 0 and 1 for no children and children respectively.
bool Children;
- /// Data - Raw data bytes for abbreviation.
- ///
+ /// Raw data bytes for abbreviation.
SmallVector<DIEAbbrevData, 12> Data;
public:
DIEAbbrev(dwarf::Tag T, bool C) : Tag(T), Children(C) {}
- // Accessors.
+ /// Accessors.
+ /// @{
dwarf::Tag getTag() const { return Tag; }
unsigned getNumber() const { return Number; }
bool hasChildren() const { return Children; }
const SmallVectorImpl<DIEAbbrevData> &getData() const { return Data; }
void setChildrenFlag(bool hasChild) { Children = hasChild; }
void setNumber(unsigned N) { Number = N; }
+ /// @}
- /// AddAttribute - Adds another set of attribute information to the
- /// abbreviation.
+ /// Adds another set of attribute information to the abbreviation.
void AddAttribute(dwarf::Attribute Attribute, dwarf::Form Form) {
Data.push_back(DIEAbbrevData(Attribute, Form));
}
- /// Profile - Used to gather unique data for the abbreviation folding set.
- ///
+ /// Used to gather unique data for the abbreviation folding set.
void Profile(FoldingSetNodeID &ID) const;
- /// Emit - Print the abbreviation using the specified asm printer.
- ///
+ /// Print the abbreviation using the specified asm printer.
void Emit(const AsmPrinter *AP) const;
void print(raw_ostream &O);
@@ -114,7 +108,7 @@ public:
};
//===--------------------------------------------------------------------===//
-/// DIEInteger - An integer value DIE.
+/// An integer value DIE.
///
class DIEInteger {
uint64_t Integer;
@@ -122,8 +116,7 @@ class DIEInteger {
public:
explicit DIEInteger(uint64_t I) : Integer(I) {}
- /// BestForm - Choose the best form for integer.
- ///
+ /// Choose the best form for integer.
static dwarf::Form BestForm(bool IsSigned, uint64_t Int) {
if (IsSigned) {
const int64_t SignedInt = Int;
@@ -154,16 +147,14 @@ public:
};
//===--------------------------------------------------------------------===//
-/// DIEExpr - An expression DIE.
-//
+/// An expression DIE.
class DIEExpr {
const MCExpr *Expr;
public:
explicit DIEExpr(const MCExpr *E) : Expr(E) {}
- /// getValue - Get MCExpr.
- ///
+ /// Get MCExpr.
const MCExpr *getValue() const { return Expr; }
void EmitValue(const AsmPrinter *AP, dwarf::Form Form) const;
@@ -173,16 +164,14 @@ public:
};
//===--------------------------------------------------------------------===//
-/// DIELabel - A label DIE.
-//
+/// A label DIE.
class DIELabel {
const MCSymbol *Label;
public:
explicit DIELabel(const MCSymbol *L) : Label(L) {}
- /// getValue - Get MCSymbol.
- ///
+ /// Get MCSymbol.
const MCSymbol *getValue() const { return Label; }
void EmitValue(const AsmPrinter *AP, dwarf::Form Form) const;
@@ -192,7 +181,7 @@ public:
};
//===--------------------------------------------------------------------===//
-/// DIEDelta - A simple label difference DIE.
+/// A simple label difference DIE.
///
class DIEDelta {
const MCSymbol *LabelHi;
@@ -208,7 +197,7 @@ public:
};
//===--------------------------------------------------------------------===//
-/// DIEString - A container for string values.
+/// A container for string values.
///
class DIEString {
DwarfStringPoolEntryRef S;
@@ -216,7 +205,7 @@ class DIEString {
public:
DIEString(DwarfStringPoolEntryRef S) : S(S) {}
- /// getString - Grab the string out of the object.
+ /// Grab the string out of the object.
StringRef getString() const { return S.getString(); }
void EmitValue(const AsmPrinter *AP, dwarf::Form Form) const;
@@ -226,9 +215,9 @@ public:
};
//===--------------------------------------------------------------------===//
-/// DIEEntry - A pointer to another debug information entry. An instance of
-/// this class can also be used as a proxy for a debug information entry not
-/// yet defined (ie. types.)
+/// A pointer to another debug information entry. An instance of this class can
+/// also be used as a proxy for a debug information entry not yet defined
+/// (ie. types.)
class DIE;
class DIEEntry {
DIE *Entry;
@@ -253,17 +242,16 @@ public:
};
//===--------------------------------------------------------------------===//
-/// DIELocList - Represents a pointer to a location list in the debug_loc
+/// Represents a pointer to a location list in the debug_loc
/// section.
-//
class DIELocList {
- // Index into the .debug_loc vector.
+ /// Index into the .debug_loc vector.
size_t Index;
public:
DIELocList(size_t I) : Index(I) {}
- /// getValue - Grab the current index out.
+ /// Grab the current index out.
size_t getValue() const { return Index; }
void EmitValue(const AsmPrinter *AP, dwarf::Form Form) const;
@@ -273,9 +261,8 @@ public:
};
//===--------------------------------------------------------------------===//
-/// DIEValue - A debug information entry value. Some of these roughly correlate
+/// A debug information entry value. Some of these roughly correlate
/// to DWARF attribute classes.
-///
class DIEBlock;
class DIELoc;
class DIEValue {
@@ -287,8 +274,7 @@ public:
};
private:
- /// Ty - Type of data stored in the value.
- ///
+ /// Type of data stored in the value.
Type Ty = isNone;
dwarf::Attribute Attribute = (dwarf::Attribute)0;
dwarf::Form Form = (dwarf::Form)0;
@@ -394,11 +380,13 @@ public:
}
#include "llvm/CodeGen/DIEValue.def"
- // Accessors
+ /// Accessors.
+ /// @{
Type getType() const { return Ty; }
dwarf::Attribute getAttribute() const { return Attribute; }
dwarf::Form getForm() const { return Form; }
explicit operator bool() const { return Ty; }
+ /// @}
#define HANDLE_DIEVALUE_SMALL(T) \
const DIE##T &getDIE##T() const { \
@@ -412,12 +400,10 @@ public:
}
#include "llvm/CodeGen/DIEValue.def"
- /// EmitValue - Emit value via the Dwarf writer.
- ///
+ /// Emit value via the Dwarf writer.
void EmitValue(const AsmPrinter *AP) const;
- /// SizeOf - Return the size of a value in bytes.
- ///
+ /// Return the size of a value in bytes.
unsigned SizeOf(const AsmPrinter *AP) const;
void print(raw_ostream &O) const;