#include "llvm/ADT/Optional.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/StringMap.h"
+#include "llvm/DIBuilder.h"
#include "llvm/DebugInfo.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCSection.h"
bool hasContent() const { return !UnitDie->getChildren().empty(); }
/// addRange - Add an address range to the list of ranges for this unit.
- void addRange(RangeSpan Range) { CURanges.push_back(Range); }
+ void addRange(RangeSpan Range) {
+ // Only add a range for this unit if we're emitting full debug.
+ if (getCUNode().getEmissionKind() == DIBuilder::FullDebug)
+ CURanges.push_back(Range);
+ }
/// getRanges - Get the list of ranges for this unit.
const SmallVectorImpl<RangeSpan> &getRanges() const { return CURanges; }
/// constructVariableDIE - Construct a DIE for the given DbgVariable.
DIE *constructVariableDIE(DbgVariable &DV, bool isScopeAbstract);
+ /// constructSubprogramArguments - Construct function argument DIEs.
+ void constructSubprogramArguments(DIE &Buffer, DIArray Args);
+
/// Create a DIE with the given Tag, add the DIE to its parent, and
/// call insertDIE if MD is not null.
DIE *createAndAddDIE(unsigned Tag, DIE &Parent,
/// either DW_FORM_addr or DW_FORM_GNU_addr_index.
void addLabelAddress(DIE *Die, dwarf::Attribute Attribute, MCSymbol *Label);
- DwarfCompileUnit &getCU() LLVM_OVERRIDE { return *this; }
+ DwarfCompileUnit &getCU() override { return *this; }
};
class DwarfTypeUnit : public DwarfUnit {
/// Emit the header for this unit, not including the initial length field.
void emitHeader(const MCSection *ASection, const MCSymbol *ASectionSym) const
- LLVM_OVERRIDE;
- unsigned getHeaderSize() const LLVM_OVERRIDE {
+ override;
+ unsigned getHeaderSize() const override {
return DwarfUnit::getHeaderSize() + sizeof(uint64_t) + // Type Signature
sizeof(uint32_t); // Type DIE Offset
}
void initSection(const MCSection *Section);
- DwarfCompileUnit &getCU() LLVM_OVERRIDE { return CU; }
+ DwarfCompileUnit &getCU() override { return CU; }
};
} // end llvm namespace
#endif