summaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Hello/Hello.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2014-11-24 09:08:18 +0000
committerdim <dim@FreeBSD.org>2014-11-24 09:08:18 +0000
commite27feadae0885aa074df58ebfda2e7a7f7a7d590 (patch)
treef5944309621cee4fe0976be6f9ac619b7ebfc4c2 /lib/Transforms/Hello/Hello.cpp
parent87ba4fbed530c9d0dff7505d121035f5ed09c9f3 (diff)
downloadFreeBSD-src-e27feadae0885aa074df58ebfda2e7a7f7a7d590.zip
FreeBSD-src-e27feadae0885aa074df58ebfda2e7a7f7a7d590.tar.gz
Vendor import of llvm RELEASE_350/final tag r216957 (effectively, 3.5.0 release):
https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_350/final@216957
Diffstat (limited to 'lib/Transforms/Hello/Hello.cpp')
-rw-r--r--lib/Transforms/Hello/Hello.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Transforms/Hello/Hello.cpp b/lib/Transforms/Hello/Hello.cpp
index 9251783..29b9bb8 100644
--- a/lib/Transforms/Hello/Hello.cpp
+++ b/lib/Transforms/Hello/Hello.cpp
@@ -12,13 +12,14 @@
//
//===----------------------------------------------------------------------===//
-#define DEBUG_TYPE "hello"
#include "llvm/ADT/Statistic.h"
#include "llvm/IR/Function.h"
#include "llvm/Pass.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
+#define DEBUG_TYPE "hello"
+
STATISTIC(HelloCounter, "Counts number of functions greeted");
namespace {
@@ -27,7 +28,7 @@ namespace {
static char ID; // Pass identification, replacement for typeid
Hello() : FunctionPass(ID) {}
- virtual bool runOnFunction(Function &F) {
+ bool runOnFunction(Function &F) override {
++HelloCounter;
errs() << "Hello: ";
errs().write_escaped(F.getName()) << '\n';
@@ -45,7 +46,7 @@ namespace {
static char ID; // Pass identification, replacement for typeid
Hello2() : FunctionPass(ID) {}
- virtual bool runOnFunction(Function &F) {
+ bool runOnFunction(Function &F) override {
++HelloCounter;
errs() << "Hello: ";
errs().write_escaped(F.getName()) << '\n';
@@ -53,7 +54,7 @@ namespace {
}
// We don't modify the program, so we preserve all analyses.
- virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+ void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesAll();
}
};
OpenPOWER on IntegriCloud