[PATCH] D138092: [llvm-debuginfo-analyzer] Return by reference instead of value - Warning analysis data.
Carlos Alberto Enciso via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 15 22:12:30 PST 2022
CarlosAlbertoEnciso created this revision.
CarlosAlbertoEnciso added reviewers: probinson, psamolysov, jryans, dblaikie, Orlando, StephenTozer.
CarlosAlbertoEnciso added projects: debug-info, LLVM.
Herald added subscribers: manas, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware.
Herald added a project: All.
CarlosAlbertoEnciso requested review of this revision.
Herald added a subscriber: llvm-commits.
The following functions are used in the unittest, to access
information about invalid information detected by the Reader
during the debug information analysis:
- getDebugTags
- getWarningOffsets
- getInvalidLocations
- getInvalidCoverages
- getInvalidRanges
- getLinesZero
Just return a reference to the container with the information.
Note: Issue discovered by the smart pointers changes to the tool.
https://reviews.llvm.org/D137933
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D138092
Files:
llvm/include/llvm/DebugInfo/LogicalView/Core/LVScope.h
Index: llvm/include/llvm/DebugInfo/LogicalView/Core/LVScope.h
===================================================================
--- llvm/include/llvm/DebugInfo/LogicalView/Core/LVScope.h
+++ llvm/include/llvm/DebugInfo/LogicalView/Core/LVScope.h
@@ -555,16 +555,16 @@
// Record line zero.
void addLineZero(LVLine *Line);
- const LVTagOffsetsMap getDebugTags() const { return DebugTags; }
- const LVOffsetElementMap getWarningOffsets() const { return WarningOffsets; }
- const LVOffsetLocationsMap getInvalidLocations() const {
+ const LVTagOffsetsMap &getDebugTags() const { return DebugTags; }
+ const LVOffsetElementMap &getWarningOffsets() const { return WarningOffsets; }
+ const LVOffsetLocationsMap &getInvalidLocations() const {
return InvalidLocations;
}
- const LVOffsetSymbolMap getInvalidCoverages() const {
+ const LVOffsetSymbolMap &getInvalidCoverages() const {
return InvalidCoverages;
}
- const LVOffsetLocationsMap getInvalidRanges() const { return InvalidRanges; }
- const LVOffsetLinesMap getLinesZero() const { return LinesZero; }
+ const LVOffsetLocationsMap &getInvalidRanges() const { return InvalidRanges; }
+ const LVOffsetLinesMap &getLinesZero() const { return LinesZero; }
// Process ranges, locations and calculate coverage.
void processRangeLocationCoverage(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138092.475680.patch
Type: text/x-patch
Size: 1335 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221116/db650bc7/attachment.bin>
More information about the llvm-commits
mailing list