summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-03-06 16:21:15 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-03-06 16:21:15 +0000
commit298a3a05673384d761e0f925f826b1f0646e190a (patch)
tree2ec2c92c5ff261ed0314da0760bcfc6e3ac22bce /llvm/lib/Transforms/Instrumentation
parent99b3e022c47b681b6c14f0a047d6dd64e232da4b (diff)
downloadbcm5719-llvm-298a3a05673384d761e0f925f826b1f0646e190a.tar.gz
bcm5719-llvm-298a3a05673384d761e0f925f826b1f0646e190a.zip
Fold init() helpers into constructors. NFC.
llvm-svn: 231486
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation')
-rw-r--r--llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
index cb965fb9a22..e50ef1e0cd2 100644
--- a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
@@ -70,20 +70,10 @@ namespace {
class GCOVProfiler : public ModulePass {
public:
static char ID;
- GCOVProfiler() : ModulePass(ID), Options(GCOVOptions::getDefault()) {
- init();
- }
- GCOVProfiler(const GCOVOptions &Options) : ModulePass(ID), Options(Options){
+ GCOVProfiler() : GCOVProfiler(GCOVOptions::getDefault()) {}
+ GCOVProfiler(const GCOVOptions &Opts) : ModulePass(ID), Options(Opts) {
assert((Options.EmitNotes || Options.EmitData) &&
"GCOVProfiler asked to do nothing?");
- init();
- }
- const char *getPassName() const override {
- return "GCOV Profiler";
- }
-
- private:
- void init() {
ReversedVersion[0] = Options.Version[3];
ReversedVersion[1] = Options.Version[2];
ReversedVersion[2] = Options.Version[1];
@@ -91,6 +81,11 @@ namespace {
ReversedVersion[4] = '\0';
initializeGCOVProfilerPass(*PassRegistry::getPassRegistry());
}
+ const char *getPassName() const override {
+ return "GCOV Profiler";
+ }
+
+ private:
bool runOnModule(Module &M) override;
// Create the .gcno files for the Module based on DebugInfo.
OpenPOWER on IntegriCloud