Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
Show First 20 Lines • Show All 1,371 Lines • ▼ Show 20 Lines | const char *yamldata = "debug_abbrev:\n" | ||||
" AbbrOffset: 0\n" | " AbbrOffset: 0\n" | ||||
" AddrSize: 8\n" | " AddrSize: 8\n" | ||||
" Entries:\n" | " Entries:\n" | ||||
" - AbbrCode: 0x00000001\n" | " - AbbrCode: 0x00000001\n" | ||||
" Values:\n" | " Values:\n" | ||||
" - AbbrCode: 0x00000000\n" | " - AbbrCode: 0x00000000\n" | ||||
" Values:\n"; | " Values:\n"; | ||||
auto ErrOrSections = DWARFYAML::emitDebugSections(StringRef(yamldata), true); | auto ErrOrSections = DWARFYAML::emitDebugSections(StringRef(yamldata)); | ||||
ASSERT_TRUE((bool)ErrOrSections); | ASSERT_TRUE((bool)ErrOrSections); | ||||
std::unique_ptr<DWARFContext> DwarfContext = | std::unique_ptr<DWARFContext> DwarfContext = | ||||
DWARFContext::create(*ErrOrSections, 8); | DWARFContext::create(*ErrOrSections, 8); | ||||
// Verify the number of compile units is correct. | // Verify the number of compile units is correct. | ||||
uint32_t NumCUs = DwarfContext->getNumCompileUnits(); | uint32_t NumCUs = DwarfContext->getNumCompileUnits(); | ||||
EXPECT_EQ(NumCUs, 1u); | EXPECT_EQ(NumCUs, 1u); | ||||
DWARFCompileUnit *U = | DWARFCompileUnit *U = | ||||
▲ Show 20 Lines • Show All 1,815 Lines • Show Last 20 Lines |