llvm.org GIT mirror llvm / 203e6f6
Reformat and 80-column this. It's not strictly conforming yet, but it's better. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167053 91177308-0d34-0410-b5e6-96231b3b80d8 Eric Christopher 6 years ago
1 changed file(s) with 29 addition(s) and 21 deletion(s). Raw diff Collapse all Expand all
340340 else
341341 debug_info_data.getU64(offset_ptr);
342342 break;
343
343
344344 default:
345345 *offset_ptr = offset;
346346 return false;
410410
411411 const char*
412412 DWARFDebugInfoEntryMinimal::getAttributeValueAsString(
413 const DWARFCompileUnit* cu,
414 const uint16_t attr,
415 const char* fail_value) const {
413 const DWARFCompileUnit* cu,
414 const uint16_t attr,
415 const char* fail_value)
416 const {
416417 DWARFFormValue form_value;
417418 if (getAttributeValue(cu, attr, form_value)) {
418419 DataExtractor stringExtractor(cu->getContext().getStringSection(),
424425
425426 uint64_t
426427 DWARFDebugInfoEntryMinimal::getAttributeValueAsUnsigned(
427 const DWARFCompileUnit* cu,
428 const uint16_t attr,
429 uint64_t fail_value) const {
428 const DWARFCompileUnit* cu,
429 const uint16_t attr,
430 uint64_t fail_value) const {
430431 DWARFFormValue form_value;
431432 if (getAttributeValue(cu, attr, form_value))
432433 return form_value.getUnsigned();
435436
436437 int64_t
437438 DWARFDebugInfoEntryMinimal::getAttributeValueAsSigned(
438 const DWARFCompileUnit* cu,
439 const uint16_t attr,
440 int64_t fail_value) const {
439 const DWARFCompileUnit* cu,
440 const uint16_t attr,
441 int64_t fail_value) const {
441442 DWARFFormValue form_value;
442443 if (getAttributeValue(cu, attr, form_value))
443444 return form_value.getSigned();
446447
447448 uint64_t
448449 DWARFDebugInfoEntryMinimal::getAttributeValueAsReference(
449 const DWARFCompileUnit* cu,
450 const uint16_t attr,
451 uint64_t fail_value) const {
450 const DWARFCompileUnit* cu,
451 const uint16_t attr,
452 uint64_t fail_value)
453 const {
452454 DWARFFormValue form_value;
453455 if (getAttributeValue(cu, attr, form_value))
454456 return form_value.getReference(cu);
456458 }
457459
458460 bool DWARFDebugInfoEntryMinimal::getLowAndHighPC(const DWARFCompileUnit *CU,
459 uint64_t &LowPC, uint64_t &HighPC) const {
461 uint64_t &LowPC,
462 uint64_t &HighPC) const {
460463 HighPC = -1ULL;
461464 LowPC = getAttributeValueAsUnsigned(CU, DW_AT_low_pc, -1ULL);
462465 if (LowPC != -1ULL)
487490
488491 bool
489492 DWARFDebugInfoEntryMinimal::addressRangeContainsAddress(
490 const DWARFCompileUnit *CU, const uint64_t Address) const {
493 const DWARFCompileUnit *CU,
494 const uint64_t Address)
495 const {
491496 if (isNULL())
492497 return false;
493498 uint64_t LowPC, HighPC;
504509 }
505510
506511 const char*
507 DWARFDebugInfoEntryMinimal::getSubroutineName(
508 const DWARFCompileUnit *CU) const {
512 DWARFDebugInfoEntryMinimal::getSubroutineName(const DWARFCompileUnit *CU)
513 const {
509514 if (!isSubroutineDIE())
510515 return 0;
511516 // Try to get mangled name if possible.
539544 return 0;
540545 }
541546
542 void DWARFDebugInfoEntryMinimal::getCallerFrame(
543 const DWARFCompileUnit *CU, uint32_t &CallFile, uint32_t &CallLine,
544 uint32_t &CallColumn) const {
547 void DWARFDebugInfoEntryMinimal::getCallerFrame(const DWARFCompileUnit *CU,
548 uint32_t &CallFile,
549 uint32_t &CallLine,
550 uint32_t &CallColumn) const {
545551 CallFile = getAttributeValueAsUnsigned(CU, DW_AT_call_file, 0);
546552 CallLine = getAttributeValueAsUnsigned(CU, DW_AT_call_line, 0);
547553 CallColumn = getAttributeValueAsUnsigned(CU, DW_AT_call_column, 0);
549555
550556 DWARFDebugInfoEntryMinimal::InlinedChain
551557 DWARFDebugInfoEntryMinimal::getInlinedChainForAddress(
552 const DWARFCompileUnit *CU, const uint64_t Address) const {
558 const DWARFCompileUnit *CU,
559 const uint64_t Address)
560 const {
553561 DWARFDebugInfoEntryMinimal::InlinedChain InlinedChain;
554562 if (isNULL())
555563 return InlinedChain;