llvm-cov: Remove dead code
authorJustin Bogner <mail@justinbogner.com>
Mon, 8 Sep 2014 19:51:21 +0000 (19:51 +0000)
committerJustin Bogner <mail@justinbogner.com>
Mon, 8 Sep 2014 19:51:21 +0000 (19:51 +0000)
FunctionCoverageMapping::PrettyName was from a version of the tool
during review, and isn't actually used currently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217398 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-cov/CodeCoverage.cpp
tools/llvm-cov/CoverageFilters.cpp
tools/llvm-cov/CoverageSummaryInfo.cpp
tools/llvm-cov/FunctionCoverageMapping.h

index bc77a9ee285110eb43e007642a6d8e476af79fc9..a19a22bc19299a904e1024dc4e7fdf53b50259c1 100644 (file)
@@ -368,7 +368,7 @@ bool CodeCoverageTool::createSourceFileView(
     for (auto Function : InstantiationSet.second) {
       auto SubView = llvm::make_unique<SourceCoverageView>(
           View, InterestingRange.first, InterestingRange.second,
-          Function->PrettyName);
+          Function->Name);
       createInstantiationSubView(SourceFile, *Function, *SubView);
       View.addChild(std::move(SubView));
     }
@@ -417,7 +417,7 @@ bool CodeCoverageTool::load() {
       if (Error && !RegionError) {
         colored_ostream(errs(), raw_ostream::RED)
             << "error: Regions and counters don't match in a function '"
-            << Function.PrettyName << "' (re-run the instrumented binary).";
+            << Function.Name << "' (re-run the instrumented binary).";
         errs() << "\n";
         RegionError = true;
       }
@@ -623,7 +623,7 @@ int CodeCoverageTool::show(int argc, const char **argv,
                                   Range.second);
       createSourceFileView(SourceFile, mainView, Function, true);
       ViewOpts.colored_ostream(outs(), raw_ostream::CYAN)
-          << Function.PrettyName << " from " << SourceFile << ":";
+          << Function.Name << " from " << SourceFile << ":";
       outs() << "\n";
       mainView.render(outs());
       if (FunctionMappingRecords.size() > 1)
index 3732d729b6cacf560f4e97228e4f89d60d4c6baf..999a6bbb7474d7ed7f9648d1e1a88917c86cf3b7 100644 (file)
 using namespace llvm;
 
 bool NameCoverageFilter::matches(const FunctionCoverageMapping &Function) {
-  StringRef FuncName = Function.PrettyName;
+  StringRef FuncName = Function.Name;
   return FuncName.find(Name) != StringRef::npos;
 }
 
 bool NameRegexCoverageFilter::matches(const FunctionCoverageMapping &Function) {
-  return llvm::Regex(Regex).match(Function.PrettyName);
+  return llvm::Regex(Regex).match(Function.Name);
 }
 
 bool RegionCoverageFilter::matches(const FunctionCoverageMapping &Function) {
index 765bb3ef84f622d04e0159de118af9f574002df4..8ed805ed0686f82bc4743ed487a6910d393994b7 100644 (file)
@@ -65,7 +65,7 @@ FunctionCoverageSummary::get(const FunctionCoverageMapping &Function) {
     NumLines += LineCount;
   }
   return FunctionCoverageSummary(
-      Function.PrettyName, RegionCoverageInfo(CoveredRegions, NumCodeRegions),
+      Function.Name, RegionCoverageInfo(CoveredRegions, NumCodeRegions),
       LineCoverageInfo(CoveredLines, 0, NumLines));
 }
 
index d171483cee93cba56e7f3573b938859bce30cd36..77440a99e6d8b5c0533f52aff416df5c47ccacb5 100644 (file)
@@ -35,14 +35,11 @@ struct MappingRegion : public coverage::CounterMappingRegion {
 struct FunctionCoverageMapping {
   /// \brief Raw function name.
   std::string Name;
-  /// \brief Demangled function name.
-  std::string PrettyName;
   std::vector<std::string> Filenames;
   std::vector<MappingRegion> MappingRegions;
 
   FunctionCoverageMapping(StringRef Name, ArrayRef<StringRef> Filenames)
-      : Name(Name), PrettyName(Name),
-        Filenames(Filenames.begin(), Filenames.end()) {}
+      : Name(Name), Filenames(Filenames.begin(), Filenames.end()) {}
 };
 
 } // namespace llvm