[NFC][llvm-dwarfdump] Avoid passing std::string by value in collectStatsForDie()
authorDjordje Todorovic <djordje.todorovic@syrmia.com>
Tue, 11 May 2021 08:23:31 +0000 (01:23 -0700)
committerDjordje Todorovic <djtodoro@cisco.com>
Wed, 12 May 2021 08:29:37 +0000 (01:29 -0700)
llvm/tools/llvm-dwarfdump/Statistics.cpp

index 48e6610..19a971a 100644 (file)
@@ -220,9 +220,9 @@ static uint64_t calculateOverlap(DWARFAddressRange A, DWARFAddressRange B) {
 }
 
 /// Collect debug info quality metrics for one DIE.
-static void collectStatsForDie(DWARFDie Die, std::string FnPrefix,
-                               std::string VarPrefix, uint64_t BytesInScope,
-                               uint32_t InlineDepth,
+static void collectStatsForDie(DWARFDie Die, const std::string &FnPrefix,
+                               const std::string &VarPrefix,
+                               uint64_t BytesInScope, uint32_t InlineDepth,
                                StringMap<PerFunctionStats> &FnStatMap,
                                GlobalStats &GlobalStats,
                                LocationStats &LocStats,