[PATCH] D66503: [Sanitizer] Remove unused functions

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 15:51:46 PDT 2019


aganea created this revision.
aganea added a reviewer: leonardchan.
aganea added a project: LLVM.

Gcc 7.3 warns these functions are unused. Should we remove them?

  [711/3639] Building CXX object lib/Transforms/Instrumentation/CMakeFiles/LLVMInstrumentation.dir/SanitizerCoverage.cpp.o
  /mnt/f/svn/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp:1028:13: warning: ‘std::__cxx11::string {anonymous}::SanitizerCoverage::getSectionEnd(const string&) const’ defined but not used [-Wunused-function]
   std::string SanitizerCoverage::getSectionEnd(const std::string &Section) const {
               ^~~~~~~~~~~~~~~~~
  /mnt/f/svn/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp:1024:1: warning: ‘std::__cxx11::string {anonymous}::SanitizerCoverage::getSectionStart(const string&) const’ defined but not used [-Wunused-function]
   SanitizerCoverage::getSectionStart(const std::string &Section) const {
   ^~~~~~~~~~~~~~~~~


Repository:
  rL LLVM

https://reviews.llvm.org/D66503

Files:
  lib/Transforms/Instrumentation/SanitizerCoverage.cpp


Index: lib/Transforms/Instrumentation/SanitizerCoverage.cpp
===================================================================
--- lib/Transforms/Instrumentation/SanitizerCoverage.cpp
+++ lib/Transforms/Instrumentation/SanitizerCoverage.cpp
@@ -1020,15 +1020,6 @@
   return "__" + Section;
 }
 
-std::string
-SanitizerCoverage::getSectionStart(const std::string &Section) const {
-  return getSectionStartImpl(TargetTriple, Section);
-}
-
-std::string SanitizerCoverage::getSectionEnd(const std::string &Section) const {
-  return getSectionEndImpl(TargetTriple, Section);
-}
-
 INITIALIZE_PASS(ModuleSanitizerCoverageLegacyPass, "module-sancov",
                 "Pass for inserting sancov top-level initialization calls",
                 false, false)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66503.216275.patch
Type: text/x-patch
Size: 756 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190820/7ae706c3/attachment.bin>


More information about the llvm-commits mailing list