[llvm] r365931 - Remove unused methods in Sancov.
Leonard Chan via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 12 11:09:09 PDT 2019
Author: leonardchan
Date: Fri Jul 12 11:09:09 2019
New Revision: 365931
URL: http://llvm.org/viewvc/llvm-project?rev=365931&view=rev
Log:
Remove unused methods in Sancov.
Modified:
llvm/trunk/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
Modified: llvm/trunk/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/SanitizerCoverage.cpp?rev=365931&r1=365930&r2=365931&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/SanitizerCoverage.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/SanitizerCoverage.cpp Fri Jul 12 11:09:09 2019
@@ -203,20 +203,6 @@ bool canInstrumentWithSancov(const Funct
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
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)
More information about the llvm-commits
mailing list