//
//===----------------------------------------------------------------------===//
-#include "llvm/BasicBlock.h"
-#include "llvm/Constant.h"
-#include "llvm/Instructions.h"
+#include "llvm/IR/BasicBlock.h"
+#include "llvm/IR/Constant.h"
+#include "llvm/IR/InstVisitor.h"
+#include "llvm/IR/Instructions.h"
+#include "llvm/IR/Type.h"
#include "llvm/Pass.h"
-#include "llvm/Type.h"
-#include "llvm/Support/InstVisitor.h"
using namespace llvm;
static char ID; // Pass ID, replacement for typeid
CrashOnCalls() : BasicBlockPass(ID) {}
private:
- virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+ void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesAll();
}
- bool runOnBasicBlock(BasicBlock &BB) {
+ bool runOnBasicBlock(BasicBlock &BB) override {
for (BasicBlock::iterator I = BB.begin(), E = BB.end(); I != E; ++I)
if (isa<CallInst>(*I))
abort();
static char ID; // Pass ID, replacement for typeid
DeleteCalls() : BasicBlockPass(ID) {}
private:
- bool runOnBasicBlock(BasicBlock &BB) {
+ bool runOnBasicBlock(BasicBlock &BB) override {
for (BasicBlock::iterator I = BB.begin(), E = BB.end(); I != E; ++I)
if (CallInst *CI = dyn_cast<CallInst>(I)) {
if (!CI->use_empty())