diff options
author | Leonard Chan <leonardchan@google.com> | 2019-07-12 18:09:09 +0000 |
---|---|---|
committer | Leonard Chan <leonardchan@google.com> | 2019-07-12 18:09:09 +0000 |
commit | 223573c8ba446f8c8efe27187fdcaee0ffdbc747 (patch) | |
tree | fe98ac2f32588e721b75fd6f05e69ed0bf715d51 | |
parent | 26a6b95da9ba1730abc6ee462d901d0c61209321 (diff) | |
download | bcm5719-llvm-223573c8ba446f8c8efe27187fdcaee0ffdbc747.tar.gz bcm5719-llvm-223573c8ba446f8c8efe27187fdcaee0ffdbc747.zip |
Remove unused methods in Sancov.
llvm-svn: 365931
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp b/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp index 47fa3863c6a..b7c29d6d28b 100644 --- a/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp +++ b/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp @@ -203,20 +203,6 @@ bool canInstrumentWithSancov(const Function &F) { return true; } -std::string getSectionStartImpl(const Triple &TargetTriple, - const std::string &Section) { - if (TargetTriple.isOSBinFormatMachO()) - return "\1section$start$__DATA$__" + Section; - return "__start___" + Section; -} - -std::string getSectionEndImpl(const Triple &TargetTriple, - const std::string &Section) { - if (TargetTriple.isOSBinFormatMachO()) - return "\1section$end$__DATA$__" + Section; - return "__stop___" + Section; -} - /// This is a class for instrumenting the module to add calls to initializing /// the trace PC guards and 8bit counter globals. This should only be done /// though if there is at least one function that can be instrumented with @@ -287,10 +273,14 @@ private: std::pair<Value *, Value *> CreateSecStartEnd(Module &M, const char *Section, Type *Ty); std::string getSectionStart(const std::string &Section) const { - return getSectionStartImpl(TargetTriple, Section); + if (TargetTriple.isOSBinFormatMachO()) + return "\1section$start$__DATA$__" + Section; + return "__start___" + Section; } std::string getSectionEnd(const std::string &Section) const { - return getSectionEndImpl(TargetTriple, Section); + if (TargetTriple.isOSBinFormatMachO()) + return "\1section$end$__DATA$__" + Section; + return "__stop___" + Section; } SanitizerCoverageOptions Options; @@ -364,8 +354,6 @@ private: } std::string getSectionName(const std::string &Section) const; - std::string getSectionStart(const std::string &Section) const; - std::string getSectionEnd(const std::string &Section) const; FunctionCallee SanCovTracePCIndir; FunctionCallee SanCovTracePC, SanCovTracePCGuard; FunctionCallee SanCovTraceCmpFunction[4]; @@ -1018,15 +1006,6 @@ SanitizerCoverage::getSectionName(const std::string &Section) const { 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) |