Revert "Use the range machinery for DW_AT_ranges and DW_AT_high/lo_pc."

This appears to trigger failures with optimization and function arguments somehow.

This reverts commit r204277.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204286 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2014-03-20 00:12:06 +00:00
parent eb7dcd71d6
commit 5a8743ef85
10 changed files with 143 additions and 244 deletions

View File

@ -178,7 +178,7 @@ static unsigned getDwarfVersionFromModule(const Module *M) {
DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M) DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
: Asm(A), MMI(Asm->MMI), FirstCU(0), PrevLabel(NULL), GlobalRangeCount(0), : Asm(A), MMI(Asm->MMI), FirstCU(0), PrevLabel(NULL), GlobalRangeCount(0),
InfoHolder(A, "info_string", DIEValueAllocator), InfoHolder(A, "info_string", DIEValueAllocator), HasCURanges(false),
UsedNonDefaultText(false), UsedNonDefaultText(false),
SkeletonHolder(A, "skel_string", DIEValueAllocator) { SkeletonHolder(A, "skel_string", DIEValueAllocator) {
@ -947,34 +947,26 @@ void DwarfDebug::finalizeModuleInfo() {
dwarf::DW_FORM_data8, ID); dwarf::DW_FORM_data8, ID);
} }
// If we have code split among multiple sections or non-contiguous // If we have code split among multiple sections or we've requested
// ranges of code then emit a DW_AT_ranges attribute on the unit that will // it then emit a DW_AT_ranges attribute on the unit that will remain
// remain in the .o file, otherwise add a DW_AT_low_pc. // in the .o file, otherwise add a DW_AT_low_pc.
// FIXME: We should use ranges allow reordering of code ala // FIXME: Also add a high pc if we can.
// .subsections_via_symbols in mach-o. This would mean turning on // FIXME: We should use ranges if we have multiple compile units or
// ranges for all subprogram DIEs for mach-o. // allow reordering of code ala .subsections_via_symbols in mach-o.
DwarfCompileUnit *U = SkCU ? SkCU : static_cast<DwarfCompileUnit *>(TheU); DwarfCompileUnit *U = SkCU ? SkCU : static_cast<DwarfCompileUnit *>(TheU);
unsigned NumRanges = TheU->getRanges().size(); if (useCURanges() && TheU->getRanges().size()) {
if (NumRanges) { addSectionLabel(Asm, U, U->getUnitDie(), dwarf::DW_AT_ranges,
if (NumRanges > 1) { Asm->GetTempSymbol("cu_ranges", U->getUniqueID()),
addSectionLabel(Asm, U, U->getUnitDie(), dwarf::DW_AT_ranges, DwarfDebugRangeSectionSym);
Asm->GetTempSymbol("cu_ranges", U->getUniqueID()),
DwarfDebugRangeSectionSym);
// A DW_AT_low_pc attribute may also be specified in combination with // A DW_AT_low_pc attribute may also be specified in combination with
// DW_AT_ranges to specify the default base address for use in // DW_AT_ranges to specify the default base address for use in location
// location lists (see Section 2.6.2) and range lists (see Section // lists (see Section 2.6.2) and range lists (see Section 2.17.3).
// 2.17.3). U->addUInt(U->getUnitDie(), dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr,
U->addUInt(U->getUnitDie(), dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr, 0);
0); } else
} else { U->addUInt(U->getUnitDie(), dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr,
RangeSpan &Range = TheU->getRanges().back(); 0);
U->addLocalLabelAddress(U->getUnitDie(), dwarf::DW_AT_low_pc,
Range.getStart());
U->addLabelDelta(U->getUnitDie(), dwarf::DW_AT_high_pc,
Range.getEnd(), Range.getStart());
}
}
} }
} }
@ -1029,6 +1021,14 @@ void DwarfDebug::endSections() {
// Insert a final terminator. // Insert a final terminator.
SectionMap[Section].push_back(SymbolCU(NULL, Sym)); SectionMap[Section].push_back(SymbolCU(NULL, Sym));
} }
// For now only turn on CU ranges if we have -ffunction-sections enabled,
// we've emitted a function into a unique section, or we're using LTO. If
// we're using LTO then we can't know that any particular function in the
// module is correlated to a particular CU and so we need to be conservative.
// At this point all sections should be finalized except for dwarf sections.
HasCURanges = UsedNonDefaultText || (CUMap.size() > 1) ||
TargetMachine::getFunctionSections();
} }
// Emit all Dwarf sections that should come after the content. // Emit all Dwarf sections that should come after the content.
@ -1423,8 +1423,12 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
// Grab the lexical scopes for the function, if we don't have any of those // Grab the lexical scopes for the function, if we don't have any of those
// then we're not going to be able to do anything. // then we're not going to be able to do anything.
LScopes.initialize(*MF); LScopes.initialize(*MF);
if (LScopes.empty()) if (LScopes.empty()) {
// If we don't have a lexical scope for this function then there will
// be a hole in the range information. Keep note of this.
UsedNonDefaultText = true;
return; return;
}
assert(UserVariables.empty() && DbgValues.empty() && "Maps weren't cleaned"); assert(UserVariables.empty() && DbgValues.empty() && "Maps weren't cleaned");
@ -1443,6 +1447,12 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
else else
Asm->OutStreamer.getContext().setDwarfCompileUnitID(TheCU->getUniqueID()); Asm->OutStreamer.getContext().setDwarfCompileUnitID(TheCU->getUniqueID());
// Check the current section against the standard text section. If different
// keep track so that we will know when we're emitting functions into multiple
// sections.
if (Asm->getObjFileLowering().getTextSection() != Asm->getCurrentSection())
UsedNonDefaultText = true;
// Emit a label for the function so that we have a beginning address. // Emit a label for the function so that we have a beginning address.
FunctionBeginSym = Asm->GetTempSymbol("func_begin", Asm->getFunctionNumber()); FunctionBeginSym = Asm->GetTempSymbol("func_begin", Asm->getFunctionNumber());
// Assumes in correct section after the entry point. // Assumes in correct section after the entry point.
@ -1648,11 +1658,6 @@ void DwarfDebug::endFunction(const MachineFunction *MF) {
assert(CurFn != 0); assert(CurFn != 0);
if (!MMI->hasDebugInfo() || LScopes.empty()) { if (!MMI->hasDebugInfo() || LScopes.empty()) {
// If we don't have a lexical scope for this function then there will
// be a hole in the range information. Keep note of this by setting the
// previously used section to nullptr.
PrevSection = nullptr;
PrevCU = nullptr;
CurFn = 0; CurFn = 0;
return; return;
} }
@ -1703,8 +1708,6 @@ void DwarfDebug::endFunction(const MachineFunction *MF) {
// Add the range of this function to the list of ranges for the CU. // Add the range of this function to the list of ranges for the CU.
RangeSpan Span(FunctionBeginSym, FunctionEndSym); RangeSpan Span(FunctionBeginSym, FunctionEndSym);
TheCU->addRange(std::move(Span)); TheCU->addRange(std::move(Span));
PrevSection = Asm->getCurrentSection();
PrevCU = TheCU;
// Clear debug info // Clear debug info
for (auto &I : ScopeVariables) for (auto &I : ScopeVariables)
@ -2594,7 +2597,7 @@ void DwarfDebug::emitDebugRanges() {
} }
// Now emit a range for the CU itself. // Now emit a range for the CU itself.
if (TheCU->getRanges().size() > 1) { if (useCURanges() && TheCU->getRanges().size()) {
Asm->OutStreamer.EmitLabel( Asm->OutStreamer.EmitLabel(
Asm->GetTempSymbol("cu_ranges", TheCU->getUniqueID())); Asm->GetTempSymbol("cu_ranges", TheCU->getUniqueID()));
for (const RangeSpan &Range : TheCU->getRanges()) { for (const RangeSpan &Range : TheCU->getRanges()) {

View File

@ -406,13 +406,6 @@ class DwarfDebug : public AsmPrinterHandler {
// If nonnull, stores the current machine instruction we're processing. // If nonnull, stores the current machine instruction we're processing.
const MachineInstr *CurMI; const MachineInstr *CurMI;
// If nonnull, stores the section that the previous function was allocated to
// emitting.
const MCSection *PrevSection;
// If nonnull, stores the CU in which the previous subprogram was contained.
const DwarfCompileUnit *PrevCU;
// Section Symbols: these are assembler temporary labels that are emitted at // Section Symbols: these are assembler temporary labels that are emitted at
// the beginning of each supported dwarf section. These are used to form // the beginning of each supported dwarf section. These are used to form
// section offsets and are created by EmitSectionLabels. // section offsets and are created by EmitSectionLabels.
@ -748,18 +741,15 @@ public:
/// split dwarf proposal support. /// split dwarf proposal support.
bool useSplitDwarf() const { return HasSplitDwarf; } bool useSplitDwarf() const { return HasSplitDwarf; }
/// \brief Returns whether or not to use AT_ranges for compilation units.
bool useCURanges() const { return HasCURanges; }
/// Returns the Dwarf Version. /// Returns the Dwarf Version.
unsigned getDwarfVersion() const { return DwarfVersion; } unsigned getDwarfVersion() const { return DwarfVersion; }
/// Returns the section symbol for the .debug_loc section. /// Returns the section symbol for the .debug_loc section.
MCSymbol *getDebugLocSym() const { return DwarfDebugLocSectionSym; } MCSymbol *getDebugLocSym() const { return DwarfDebugLocSectionSym; }
/// Returns the previous section that was emitted into.
const MCSection *getPrevSection() const { return PrevSection; }
/// Returns the previous CU that was being updated
const DwarfCompileUnit *getPrevCU() const { return PrevCU; }
/// Returns the entries for the .debug_loc section. /// Returns the entries for the .debug_loc section.
const SmallVectorImpl<DebugLocEntry> &getDebugLocEntries() const { const SmallVectorImpl<DebugLocEntry> &getDebugLocEntries() const {
return DotDebugLocEntries; return DotDebugLocEntries;

View File

@ -282,31 +282,22 @@ void DwarfUnit::addSectionOffset(DIE *Die, dwarf::Attribute Attribute,
/// DW_FORM_addr or DW_FORM_GNU_addr_index. /// DW_FORM_addr or DW_FORM_GNU_addr_index.
/// ///
void DwarfCompileUnit::addLabelAddress(DIE *Die, dwarf::Attribute Attribute, void DwarfCompileUnit::addLabelAddress(DIE *Die, dwarf::Attribute Attribute,
const MCSymbol *Label) { MCSymbol *Label) {
if (!DD->useSplitDwarf())
return addLocalLabelAddress(Die, Attribute, Label);
if (Label) if (Label)
DD->addArangeLabel(SymbolCU(this, Label)); DD->addArangeLabel(SymbolCU(this, Label));
unsigned idx = DU->getAddrPoolIndex(Label); if (!DD->useSplitDwarf()) {
DIEValue *Value = new (DIEValueAllocator) DIEInteger(idx); if (Label) {
Die->addValue(Attribute, dwarf::DW_FORM_GNU_addr_index, Value); DIEValue *Value = new (DIEValueAllocator) DIELabel(Label);
} Die->addValue(Attribute, dwarf::DW_FORM_addr, Value);
} else {
void DwarfCompileUnit::addLocalLabelAddress(DIE *Die, DIEValue *Value = new (DIEValueAllocator) DIEInteger(0);
dwarf::Attribute Attribute, Die->addValue(Attribute, dwarf::DW_FORM_addr, Value);
const MCSymbol *Label) { }
if (Label)
DD->addArangeLabel(SymbolCU(this, Label));
if (Label) {
DIEValue *Value = new (DIEValueAllocator) DIELabel(Label);
Die->addValue(Attribute, dwarf::DW_FORM_addr, Value);
} else { } else {
DIEValue *Value = new (DIEValueAllocator) DIEInteger(0); unsigned idx = DU->getAddrPoolIndex(Label);
Die->addValue(Attribute, dwarf::DW_FORM_addr, Value); DIEValue *Value = new (DIEValueAllocator) DIEInteger(idx);
Die->addValue(Attribute, dwarf::DW_FORM_GNU_addr_index, Value);
} }
} }
@ -2043,27 +2034,6 @@ void DwarfUnit::emitHeader(const MCSection *ASection,
Asm->EmitInt8(Asm->getDataLayout().getPointerSize()); Asm->EmitInt8(Asm->getDataLayout().getPointerSize());
} }
void DwarfUnit::addRange(RangeSpan Range) {
// Only add a range for this unit if we're emitting full debug.
if (getCUNode().getEmissionKind() == DIBuilder::FullDebug) {
// If we have no current ranges just add the range and return, otherwise,
// check the current section and CU against the previous section and CU we
// emitted into and the subprogram was contained within. If these are the
// same then extend our current range, otherwise add this as a new range.
if (CURanges.size() == 0 ||
this != DD->getPrevCU() ||
Asm->getCurrentSection() != DD->getPrevSection()) {
CURanges.push_back(Range);
return;
}
assert(&(CURanges.back().getEnd()->getSection()) ==
&(Range.getEnd()->getSection()) &&
"We can only append to a range in the same section!");
CURanges.back().setEnd(Range.getEnd());
}
}
void DwarfCompileUnit::initStmtList(MCSymbol *DwarfLineSectionSym) { void DwarfCompileUnit::initStmtList(MCSymbol *DwarfLineSectionSym) {
// Define start line table label for each Compile Unit. // Define start line table label for each Compile Unit.
MCSymbol *LineTableStartSym = MCSymbol *LineTableStartSym =

View File

@ -41,7 +41,6 @@ public:
RangeSpan(MCSymbol *S, MCSymbol *E) : Start(S), End(E) {} RangeSpan(MCSymbol *S, MCSymbol *E) : Start(S), End(E) {}
const MCSymbol *getStart() const { return Start; } const MCSymbol *getStart() const { return Start; }
const MCSymbol *getEnd() const { return End; } const MCSymbol *getEnd() const { return End; }
void setEnd(const MCSymbol *E) { End = E; }
private: private:
const MCSymbol *Start, *End; const MCSymbol *Start, *End;
@ -252,7 +251,11 @@ public:
bool hasContent() const { return !UnitDie->getChildren().empty(); } bool hasContent() const { return !UnitDie->getChildren().empty(); }
/// addRange - Add an address range to the list of ranges for this unit. /// addRange - Add an address range to the list of ranges for this unit.
void addRange(RangeSpan 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. /// getRanges - Get the list of ranges for this unit.
const SmallVectorImpl<RangeSpan> &getRanges() const { return CURanges; } const SmallVectorImpl<RangeSpan> &getRanges() const { return CURanges; }
@ -580,13 +583,7 @@ public:
/// addLabelAddress - Add a dwarf label attribute data and value using /// addLabelAddress - Add a dwarf label attribute data and value using
/// either DW_FORM_addr or DW_FORM_GNU_addr_index. /// either DW_FORM_addr or DW_FORM_GNU_addr_index.
void addLabelAddress(DIE *Die, dwarf::Attribute Attribute, void addLabelAddress(DIE *Die, dwarf::Attribute Attribute, MCSymbol *Label);
const MCSymbol *Label);
/// addLocalLabelAddress - Add a dwarf label attribute data and value using
/// DW_FORM_addr only.
void addLocalLabelAddress(DIE *Die, dwarf::Attribute Attribute,
const MCSymbol *Label);
DwarfCompileUnit &getCU() override { return *this; } DwarfCompileUnit &getCU() override { return *this; }

View File

@ -9,9 +9,6 @@
; int foo (int a) { ; int foo (int a) {
; return a+1; ; return a+1;
; } ; }
; int bar (int b) {
; return b+2;
; }
; With function sections enabled make sure that we have a DW_AT_ranges attribute. ; With function sections enabled make sure that we have a DW_AT_ranges attribute.
; FUNCTION-SECTIONS: DW_AT_ranges ; FUNCTION-SECTIONS: DW_AT_ranges
@ -27,7 +24,7 @@ define i32 @foo(i32 %a) #0 {
entry: entry:
%a.addr = alloca i32, align 4 %a.addr = alloca i32, align 4
store i32 %a, i32* %a.addr, align 4 store i32 %a, i32* %a.addr, align 4
call void @llvm.dbg.declare(metadata !{i32* %a.addr}, metadata !13), !dbg !14 call void @llvm.dbg.declare(metadata !{i32* %a.addr}, metadata !12), !dbg !13
%0 = load i32* %a.addr, align 4, !dbg !14 %0 = load i32* %a.addr, align 4, !dbg !14
%add = add nsw i32 %0, 1, !dbg !14 %add = add nsw i32 %0, 1, !dbg !14
ret i32 %add, !dbg !14 ret i32 %add, !dbg !14
@ -36,38 +33,25 @@ entry:
; Function Attrs: nounwind readnone ; Function Attrs: nounwind readnone
declare void @llvm.dbg.declare(metadata, metadata) #1 declare void @llvm.dbg.declare(metadata, metadata) #1
; Function Attrs: nounwind uwtable
define i32 @bar(i32 %b) #0 {
entry:
%b.addr = alloca i32, align 4
store i32 %b, i32* %b.addr, align 4
call void @llvm.dbg.declare(metadata !{i32* %b.addr}, metadata !15), !dbg !16
%0 = load i32* %b.addr, align 4, !dbg !16
%add = add nsw i32 %0, 2, !dbg !16
ret i32 %add, !dbg !16
}
attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { nounwind readnone } attributes #1 = { nounwind readnone }
!llvm.dbg.cu = !{!0} !llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!10, !11} !llvm.module.flags = !{!9, !10}
!llvm.ident = !{!12} !llvm.ident = !{!11}
!0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !3, metadata !2, metadata !2, metadata !"", i32 1} ; [ DW_TAG_compile_unit ] [/usr/local/google/home/echristo/z.c] [DW_LANG_C99] !0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.5 (trunk 199256) (llvm/trunk 199254)", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !3, metadata !2, metadata !2, metadata !"", i32 1} ; [ DW_TAG_compile_unit ] [/usr/local/google/home/echristo/tmp/foo.c] [DW_LANG_C99]
!1 = metadata !{metadata !"z.c", metadata !"/usr/local/google/home/echristo"} !1 = metadata !{metadata !"foo.c", metadata !"/usr/local/google/home/echristo/tmp"}
!2 = metadata !{} !2 = metadata !{}
!3 = metadata !{metadata !4, metadata !9} !3 = metadata !{metadata !4}
!4 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"foo", metadata !"foo", metadata !"", i32 1, metadata !6, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (i32)* @foo, null, null, metadata !2, i32 1} ; [ DW_TAG_subprogram ] [line 1] [def] [foo] !4 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"foo", metadata !"foo", metadata !"", i32 1, metadata !6, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (i32)* @foo, null, null, metadata !2, i32 1} ; [ DW_TAG_subprogram ] [line 1] [def] [foo]
!5 = metadata !{i32 786473, metadata !1} ; [ DW_TAG_file_type ] [/usr/local/google/home/echristo/z.c] !5 = metadata !{i32 786473, metadata !1} ; [ DW_TAG_file_type ] [/usr/local/google/home/echristo/tmp/foo.c]
!6 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !7, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] !6 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !7, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
!7 = metadata !{metadata !8, metadata !8} !7 = metadata !{metadata !8, metadata !8}
!8 = metadata !{i32 786468, null, null, metadata !"int", i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed] !8 = metadata !{i32 786468, null, null, metadata !"int", i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
!9 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"bar", metadata !"bar", metadata !"", i32 2, metadata !6, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (i32)* @bar, null, null, metadata !2, i32 2} ; [ DW_TAG_subprogram ] [line 2] [def] [bar] !9 = metadata !{i32 2, metadata !"Dwarf Version", i32 4}
!10 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} !10 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}
!11 = metadata !{i32 1, metadata !"Debug Info Version", i32 1} !11 = metadata !{metadata !"clang version 3.5 (trunk 199256) (llvm/trunk 199254)"}
!12 = metadata !{metadata !"clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)"} !12 = metadata !{i32 786689, metadata !4, metadata !"a", metadata !5, i32 16777217, metadata !8, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [a] [line 1]
!13 = metadata !{i32 786689, metadata !4, metadata !"a", metadata !5, i32 16777217, metadata !8, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [a] [line 1] !13 = metadata !{i32 1, i32 0, metadata !4, null}
!14 = metadata !{i32 1, i32 0, metadata !4, null} !14 = metadata !{i32 2, i32 0, metadata !4, null}
!15 = metadata !{i32 786689, metadata !9, metadata !"b", metadata !5, i32 16777218, metadata !8, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [b] [line 2]
!16 = metadata !{i32 2, i32 0, metadata !9, null}

View File

@ -29,6 +29,7 @@
; CHECK: DW_AT_GNU_addr_base DW_FORM_sec_offset ; CHECK: DW_AT_GNU_addr_base DW_FORM_sec_offset
; CHECK: DW_AT_comp_dir DW_FORM_strp ; CHECK: DW_AT_comp_dir DW_FORM_strp
; CHECK: DW_AT_GNU_dwo_id DW_FORM_data8 ; CHECK: DW_AT_GNU_dwo_id DW_FORM_data8
; CHECK: DW_AT_low_pc DW_FORM_addr
; Check that we're using the right forms. ; Check that we're using the right forms.
; CHECK: .debug_abbrev.dwo contents: ; CHECK: .debug_abbrev.dwo contents:
@ -62,6 +63,7 @@
; CHECK: DW_AT_GNU_addr_base [DW_FORM_sec_offset] (0x00000000) ; CHECK: DW_AT_GNU_addr_base [DW_FORM_sec_offset] (0x00000000)
; CHECK: DW_AT_comp_dir [DW_FORM_strp] ( .debug_str[0x00000008] = "/usr/local/google/home/echristo/tmp") ; CHECK: DW_AT_comp_dir [DW_FORM_strp] ( .debug_str[0x00000008] = "/usr/local/google/home/echristo/tmp")
; CHECK: DW_AT_GNU_dwo_id [DW_FORM_data8] (0x1f1f859683d49324) ; CHECK: DW_AT_GNU_dwo_id [DW_FORM_data8] (0x1f1f859683d49324)
; CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
; Check that the rest of the compile units have information. ; Check that the rest of the compile units have information.
; CHECK: .debug_info.dwo contents: ; CHECK: .debug_info.dwo contents:

View File

@ -5,32 +5,28 @@
; CHECK: DW_TAG_compile_unit [1] ; CHECK: DW_TAG_compile_unit [1]
; CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000) ; CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
; CHECK: DW_AT_high_pc [DW_FORM_data4]
; CHECK: DW_TAG_subprogram [2] ; CHECK: DW_TAG_subprogram [2]
; CHECK: DW_AT_low_pc [DW_FORM_addr]
; CHECK: DW_AT_high_pc [DW_FORM_data4]
; Function Attrs: nounwind uwtable define i32 @_Z1qv() nounwind uwtable readnone ssp {
define void @z() #0 {
entry: entry:
ret void, !dbg !11 ret i32 undef, !dbg !13
} }
attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
!llvm.dbg.cu = !{!0} !llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!8, !9} !llvm.module.flags = !{!16}
!llvm.ident = !{!10}
!0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !3, metadata !2, metadata !2, metadata !"", i32 1} ; [ DW_TAG_compile_unit ] [/usr/local/google/home/echristo/z.c] [DW_LANG_C99] !0 = metadata !{i32 786449, metadata !15, i32 4, metadata !"clang version 3.1 (trunk 153454) (llvm/trunk 153471)", i1 false, metadata !"", i32 0, metadata !1, metadata !1, metadata !3, metadata !1, metadata !1, metadata !""} ; [ DW_TAG_compile_unit ]
!1 = metadata !{metadata !"z.c", metadata !"/usr/local/google/home/echristo"} !1 = metadata !{}
!2 = metadata !{} !3 = metadata !{metadata !5, metadata !12}
!3 = metadata !{metadata !4} !5 = metadata !{i32 786478, metadata !6, null, metadata !"q", metadata !"q", metadata !"_Z1qv", i32 5, metadata !7, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 ()* @_Z1qv, null, null, metadata !10, i32 0} ; [ DW_TAG_subprogram ] [line 5] [def] [scope 0] [q]
!4 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"z", metadata !"z", metadata !"", i32 1, metadata !6, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, void ()* @z, null, null, metadata !2, i32 1} ; [ DW_TAG_subprogram ] [line 1] [def] [z] !6 = metadata !{i32 786473, metadata !15} ; [ DW_TAG_file_type ]
!5 = metadata !{i32 786473, metadata !1} ; [ DW_TAG_file_type ] [/usr/local/google/home/echristo/z.c] !7 = metadata !{i32 786453, i32 0, null, i32 0, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !8, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
!6 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !7, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] !8 = metadata !{metadata !9}
!7 = metadata !{null} !9 = metadata !{i32 786468, metadata !15, null, metadata !"int", i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]
!8 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} !10 = metadata !{metadata !11}
!9 = metadata !{i32 1, metadata !"Debug Info Version", i32 1} !11 = metadata !{i32 786468} ; [ DW_TAG_base_type ]
!10 = metadata !{metadata !"clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)"} !12 = metadata !{i32 786478, metadata !15, metadata !6, metadata !"t", metadata !"t", metadata !"", i32 2, metadata !7, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, null, null, null, metadata !10, i32 0} ; [ DW_TAG_subprogram ]
!11 = metadata !{i32 1, i32 0, metadata !4, null} !13 = metadata !{i32 7, i32 1, metadata !14, null}
!14 = metadata !{i32 786443, metadata !5, i32 5, i32 1, metadata !6, i32 0} ; [ DW_TAG_lexical_block ]
!15 = metadata !{metadata !"foo.cpp", metadata !"/Users/echristo/tmp"}
!16 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}

View File

@ -8,20 +8,13 @@
; CHECK: .debug_info contents: ; CHECK: .debug_info contents:
; CHECK: DW_TAG_compile_unit ; CHECK: DW_TAG_compile_unit
; CHECK: DW_AT_stmt_list [DW_FORM_sec_offset] (0x00000000) ; CHECK: DW_AT_stmt_list [DW_FORM_sec_offset] (0x00000000)
; CHECK: DW_AT_ranges [DW_FORM_sec_offset] (0x00000000)
; CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000) ; CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
; CHECK: DW_AT_high_pc [DW_FORM_data4] (0x00000010)
; CHECK: DW_TAG_subprogram
; CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
; CHECK: DW_AT_high_pc [DW_FORM_data4] (0x00000010)
; CHECK: DW_TAG_compile_unit ; CHECK: DW_TAG_compile_unit
; CHECK: DW_AT_stmt_list [DW_FORM_sec_offset] (0x0000003c) ; CHECK: DW_AT_stmt_list [DW_FORM_sec_offset] (0x0000003c)
; CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000010) ; CHECK: DW_AT_ranges [DW_FORM_sec_offset] (0x00000020)
; CHECK: DW_AT_high_pc [DW_FORM_data4] (0x00000009) ; CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
; CHECK: DW_TAG_subprogram
; CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000010)
; CHECK: DW_AT_high_pc [DW_FORM_data4] (0x00000009)
; CHECK: .debug_line contents: ; CHECK: .debug_line contents:
; CHECK-NEXT: Line table prologue: ; CHECK-NEXT: Line table prologue:
@ -35,10 +28,13 @@
; DWARF3: .debug_info contents: ; DWARF3: .debug_info contents:
; DWARF3: DW_TAG_compile_unit ; DWARF3: DW_TAG_compile_unit
; DWARF3: DW_AT_stmt_list [DW_FORM_data4] (0x00000000) ; DWARF3: DW_AT_stmt_list [DW_FORM_data4] (0x00000000)
; DWARF3: DW_AT_ranges [DW_FORM_data4] (0x00000000)
; DWARF3: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
; DWARF3: DW_TAG_compile_unit ; DWARF3: DW_TAG_compile_unit
; DWARF3: DW_AT_stmt_list [DW_FORM_data4] (0x0000003c) ; DWARF3: DW_AT_stmt_list [DW_FORM_data4] (0x0000003c)
; DWARF3: DW_AT_ranges [DW_FORM_data4] (0x00000020)
; DWARF3: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
; DWARF3: .debug_line contents: ; DWARF3: .debug_line contents:
; DWARF3-NEXT: Line table prologue: ; DWARF3-NEXT: Line table prologue:

View File

@ -4,28 +4,26 @@
; Check that we emit ranges for this CU since we have a function with and ; Check that we emit ranges for this CU since we have a function with and
; without debug info. ; without debug info.
; Note: This depends upon the order of output in the .o file. Currently it's
; in order of the output to make sure that the CU has multiple ranges since
; there's a function in the middle. If they were together then it would have
; a single range and no DW_AT_ranges.
; CHECK: DW_TAG_compile_unit ; CHECK: DW_TAG_compile_unit
; CHECK: DW_AT_ranges ; CHECK: DW_AT_ranges
; CHECK: DW_TAG_subprogram ; CHECK: DW_TAG_subprogram
; CHECK: DW_TAG_subprogram
; Function Attrs: nounwind uwtable ; Function Attrs: nounwind uwtable
define i32 @b(i32 %c) #0 { define i32 @foo(i32 %a) #0 {
entry: entry:
%c.addr = alloca i32, align 4 %a.addr = alloca i32, align 4
store i32 %c, i32* %c.addr, align 4 store i32 %a, i32* %a.addr, align 4
call void @llvm.dbg.declare(metadata !{i32* %c.addr}, metadata !13), !dbg !14 call void @llvm.dbg.declare(metadata !{i32* %a.addr}, metadata !12), !dbg !13
%0 = load i32* %c.addr, align 4, !dbg !14 %0 = load i32* %a.addr, align 4, !dbg !14
%add = add nsw i32 %0, 1, !dbg !14 %add = add nsw i32 %0, 5, !dbg !14
ret i32 %add, !dbg !14 ret i32 %add, !dbg !14
} }
; Function Attrs: nounwind readnone
declare void @llvm.dbg.declare(metadata, metadata) #1
; Function Attrs: nounwind uwtable ; Function Attrs: nounwind uwtable
define i32 @a(i32 %b) #0 { define i32 @bar(i32 %b) #0 {
entry: entry:
%b.addr = alloca i32, align 4 %b.addr = alloca i32, align 4
store i32 %b, i32* %b.addr, align 4 store i32 %b, i32* %b.addr, align 4
@ -34,41 +32,25 @@ entry:
ret i32 %add ret i32 %add
} }
; Function Attrs: nounwind readnone
declare void @llvm.dbg.declare(metadata, metadata) #1
; Function Attrs: nounwind uwtable
define i32 @d(i32 %e) #0 {
entry:
%e.addr = alloca i32, align 4
store i32 %e, i32* %e.addr, align 4
call void @llvm.dbg.declare(metadata !{i32* %e.addr}, metadata !15), !dbg !16
%0 = load i32* %e.addr, align 4, !dbg !16
%add = add nsw i32 %0, 1, !dbg !16
ret i32 %add, !dbg !16
}
attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { nounwind readnone } attributes #1 = { nounwind readnone }
!llvm.ident = !{!0, !0} !llvm.dbg.cu = !{!0}
!llvm.dbg.cu = !{!1} !llvm.module.flags = !{!9, !10}
!llvm.module.flags = !{!11, !12} !llvm.ident = !{!11, !11}
!0 = metadata !{metadata !"clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)"} !0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.5.0 (trunk 203945) (llvm/trunk 203946)", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !3, metadata !2, metadata !2, metadata !"", i32 1}
!1 = metadata !{i32 786449, metadata !2, i32 12, metadata !"clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)", i1 false, metadata !"", i32 0, metadata !3, metadata !3, metadata !4, metadata !3, metadata !3, metadata !"", i32 1} !1 = metadata !{metadata !"foo.c", metadata !"/usr/local/google/home/echristo"}
!2 = metadata !{metadata !"b.c", metadata !"/usr/local/google/home/echristo"} !2 = metadata !{}
!3 = metadata !{} !3 = metadata !{metadata !4}
!4 = metadata !{metadata !5, metadata !10} !4 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"foo", metadata !"foo", metadata !"", i32 1, metadata !6, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (i32)* @foo, null, null, metadata !2, i32 1} ; [ DW_TAG_subprogram ] [line 1] [def] [foo]
!5 = metadata !{i32 786478, metadata !2, metadata !6, metadata !"b", metadata !"b", metadata !"", i32 1, metadata !7, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (i32)* @b, null, null, metadata !3, i32 1} ; [ DW_TAG_subprogram ] [line 1] [def] [b] !5 = metadata !{i32 786473, metadata !1} ; [ DW_TAG_file_type ] [/usr/local/google/home/echristo/foo.c]
!6 = metadata !{i32 786473, metadata !2} ; [ DW_TAG_file_type ] [/usr/local/google/home/echristo/b.c] !6 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !7, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
!7 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !8, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] !7 = metadata !{metadata !8, metadata !8}
!8 = metadata !{metadata !9, metadata !9} !8 = metadata !{i32 786468, null, null, metadata !"int", i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
!9 = metadata !{i32 786468, null, null, metadata !"int", i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed] !9 = metadata !{i32 2, metadata !"Dwarf Version", i32 4}
!10 = metadata !{i32 786478, metadata !2, metadata !6, metadata !"d", metadata !"d", metadata !"", i32 3, metadata !7, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (i32)* @d, null, null, metadata !3, i32 3} ; [ DW_TAG_subprogram ] [line 3] [def] [d] !10 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}
!11 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} !11 = metadata !{metadata !"clang version 3.5.0 (trunk 203945) (llvm/trunk 203946)"}
!12 = metadata !{i32 1, metadata !"Debug Info Version", i32 1} !12 = metadata !{i32 786689, metadata !4, metadata !"a", metadata !5, i32 16777217, metadata !8, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [a] [line 1]
!13 = metadata !{i32 786689, metadata !5, metadata !"c", metadata !6, i32 16777217, metadata !9, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [c] [line 1] !13 = metadata !{i32 1, i32 0, metadata !4, null}
!14 = metadata !{i32 1, i32 0, metadata !5, null} !14 = metadata !{i32 2, i32 0, metadata !4, null}
!15 = metadata !{i32 786689, metadata !10, metadata !"e", metadata !6, i32 16777219, metadata !9, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [e] [line 3]
!16 = metadata !{i32 3, i32 0, metadata !10, null}

View File

@ -2,16 +2,11 @@
; RUN: %llc_dwarf -O0 -filetype=obj %s -o %t ; RUN: %llc_dwarf -O0 -filetype=obj %s -o %t
; RUN: llvm-dwarfdump %t | FileCheck %s ; RUN: llvm-dwarfdump %t | FileCheck %s
; Check that we emit ranges for this which has a non-traditional section and a normal section. ; Check that we emit ranges for this which has a non-traditional section.
; CHECK: DW_TAG_compile_unit ; CHECK: DW_TAG_compile_unit
; CHECK: DW_AT_ranges ; CHECK: DW_AT_ranges
; CHECK: DW_TAG_subprogram ; CHECK: DW_TAG_subprogram
; CHECK: DW_AT_low_pc
; CHECK: DW_AT_high_pc
; CHECK: DW_TAG_subprogram
; CHECK: DW_AT_low_pc
; CHECK: DW_AT_high_pc
; CHECK: .debug_ranges contents: ; CHECK: .debug_ranges contents:
; FIXME: When we get better dumping facilities we'll want to elaborate here. ; FIXME: When we get better dumping facilities we'll want to elaborate here.
@ -22,50 +17,34 @@ define i32 @foo(i32 %a) #0 section "__TEXT,__foo" {
entry: entry:
%a.addr = alloca i32, align 4 %a.addr = alloca i32, align 4
store i32 %a, i32* %a.addr, align 4 store i32 %a, i32* %a.addr, align 4
call void @llvm.dbg.declare(metadata !{i32* %a.addr}, metadata !13), !dbg !14 call void @llvm.dbg.declare(metadata !{i32* %a.addr}, metadata !12), !dbg !13
%0 = load i32* %a.addr, align 4, !dbg !15 %0 = load i32* %a.addr, align 4, !dbg !14
%add = add nsw i32 %0, 5, !dbg !15 %add = add nsw i32 %0, 5, !dbg !14
ret i32 %add, !dbg !15 ret i32 %add, !dbg !14
} }
; Function Attrs: nounwind readnone ; Function Attrs: nounwind readnone
declare void @llvm.dbg.declare(metadata, metadata) #1 declare void @llvm.dbg.declare(metadata, metadata) #1
; Function Attrs: nounwind uwtable
define i32 @bar(i32 %a) #0 {
entry:
%a.addr = alloca i32, align 4
store i32 %a, i32* %a.addr, align 4
call void @llvm.dbg.declare(metadata !{i32* %a.addr}, metadata !16), !dbg !17
%0 = load i32* %a.addr, align 4, !dbg !18
%add = add nsw i32 %0, 5, !dbg !18
ret i32 %add, !dbg !18
}
attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { nounwind readnone } attributes #1 = { nounwind readnone }
!llvm.dbg.cu = !{!0} !llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!10, !11} !llvm.module.flags = !{!9, !10}
!llvm.ident = !{!12} !llvm.ident = !{!11}
!0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !3, metadata !2, metadata !2, metadata !"", i32 1} ; [ DW_TAG_compile_unit ] [/usr/local/google/home/echristo/foo.c] [DW_LANG_C99] !0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.5.0 (trunk 203959) (llvm/trunk 203946)", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !3, metadata !2, metadata !2, metadata !"", i32 1} ; [ DW_TAG_compile_unit ] [/usr/local/google/home/echristo/foo.c] [DW_LANG_C99]
!1 = metadata !{metadata !"foo.c", metadata !"/usr/local/google/home/echristo"} !1 = metadata !{metadata !"foo.c", metadata !"/usr/local/google/home/echristo"}
!2 = metadata !{} !2 = metadata !{}
!3 = metadata !{metadata !4, metadata !9} !3 = metadata !{metadata !4}
!4 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"foo", metadata !"foo", metadata !"", i32 1, metadata !6, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (i32)* @foo, null, null, metadata !2, i32 1} ; [ DW_TAG_subprogram ] [line 1] [def] [foo] !4 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"foo", metadata !"foo", metadata !"", i32 1, metadata !6, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (i32)* @foo, null, null, metadata !2, i32 1} ; [ DW_TAG_subprogram ] [line 1] [def] [foo]
!5 = metadata !{i32 786473, metadata !1} ; [ DW_TAG_file_type ] [/usr/local/google/home/echristo/foo.c] !5 = metadata !{i32 786473, metadata !1} ; [ DW_TAG_file_type ] [/usr/local/google/home/echristo/foo.c]
!6 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !7, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] !6 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !7, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
!7 = metadata !{metadata !8, metadata !8} !7 = metadata !{metadata !8, metadata !8}
!8 = metadata !{i32 786468, null, null, metadata !"int", i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed] !8 = metadata !{i32 786468, null, null, metadata !"int", i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
!9 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"bar", metadata !"bar", metadata !"", i32 5, metadata !6, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (i32)* @bar, null, null, metadata !2, i32 5} ; [ DW_TAG_subprogram ] [line 5] [def] [bar] !9 = metadata !{i32 2, metadata !"Dwarf Version", i32 4}
!10 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} !10 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}
!11 = metadata !{i32 1, metadata !"Debug Info Version", i32 1} !11 = metadata !{metadata !"clang version 3.5.0 (trunk 203959) (llvm/trunk 203946)"}
!12 = metadata !{metadata !"clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)"} !12 = metadata !{i32 786689, metadata !4, metadata !"a", metadata !5, i32 16777217, metadata !8, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [a] [line 1]
!13 = metadata !{i32 786689, metadata !4, metadata !"a", metadata !5, i32 16777217, metadata !8, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [a] [line 1] !13 = metadata !{i32 1, i32 0, metadata !4, null}
!14 = metadata !{i32 1, i32 0, metadata !4, null} !14 = metadata !{i32 2, i32 0, metadata !4, null}
!15 = metadata !{i32 2, i32 0, metadata !4, null}
!16 = metadata !{i32 786689, metadata !9, metadata !"a", metadata !5, i32 16777221, metadata !8, i32 0, i32 0} ; [ DW_TAG_arg_variable ] [a] [line 5]
!17 = metadata !{i32 5, i32 0, metadata !9, null}
!18 = metadata !{i32 6, i32 0, metadata !9, null}