[PATCH] D115973: [llvm-profgen] Support symbol loading for debug fission
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 7 16:48:37 PST 2022
MaskRay added a subscriber: jhenderson.
MaskRay added a comment.
In 2021-01, https://lists.llvm.org/pipermail/llvm-dev/2021-January/148048.html (`[RFC] Cross-project lit test suite`) discussed some pain in cross-project debug info testing. Perhaps @jhenderson has some idea for the clang usage in the test.
================
Comment at: llvm/test/tools/llvm-profgen/split-dwarf.test:18
+
+;CHECK-SPLIT-DWARF: bar:0:0
+;CHECK-SPLIT-DWARF: 1: 0
----------------
================
Comment at: llvm/test/tools/llvm-profgen/split-dwarf.test:19
+;CHECK-SPLIT-DWARF: bar:0:0
+;CHECK-SPLIT-DWARF: 1: 0
+;CHECK-SPLIT-DWARF: 5: 0
----------------
Add `-NEXT:` whenever applicable to have a better FileCheck diagnostic in case of an error. Tests should be written in the mind that others may need to update them.
================
Comment at: llvm/tools/llvm-profgen/ProfiledBinary.cpp:674
if (!DebugContext)
exitWithError("Misssing debug info.", Path);
----------------
wenlei wrote:
> typo: Misssing->Missing
https://llvm.org/docs/CodingStandards.html#error-and-warning-messages
================
Comment at: llvm/tools/llvm-profgen/ProfiledBinary.cpp:677
for (const auto &CompilationUnit : DebugContext->compile_units()) {
- for (const auto &DieInfo : CompilationUnit->dies()) {
- llvm::DWARFDie Die(CompilationUnit.get(), &DieInfo);
-
- if (!Die.isSubprogramDIE())
- continue;
- auto Name = Die.getName(llvm::DINameKind::LinkageName);
- if (!Name)
- Name = Die.getName(llvm::DINameKind::ShortName);
- if (!Name)
- continue;
-
- auto RangesOrError = Die.getAddressRanges();
- if (!RangesOrError)
- continue;
- const DWARFAddressRangesVector &Ranges = RangesOrError.get();
+ loadSymbolsFromDWARFUnit(*CompilationUnit.get());
+ }
----------------
https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115973/new/
https://reviews.llvm.org/D115973
More information about the llvm-commits
mailing list