//
//===----------------------------------------------------------------------===//
-#include "llvm/Analysis/Verifier.h"
+#include "llvm/IR/Verifier.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
-#include "llvm/Analysis/Dominators.h"
#include "llvm/DebugInfo.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
+#include "llvm/IR/Dominators.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
-#include "llvm/IR/Writer.h"
#include "llvm/InstVisitor.h"
#include "llvm/Pass.h"
#include "llvm/PassManager.h"
if (I->empty() || !I->back().isTerminator()) {
dbgs() << "Basic Block in function '" << F.getName()
<< "' does not have terminator!\n";
- WriteAsOperand(dbgs(), I, true);
+ I->printAsOperand(dbgs(), true);
dbgs() << "\n";
Broken = true;
}
bool runOnFunction(Function &F) {
// Get dominator information if we are being run by PassManager
- DT = &getAnalysis<DominatorTree>();
+ DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
Mod = F.getParent();
if (!Context) Context = &F.getContext();
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
AU.addRequiredID(PreVerifyID);
- AU.addRequired<DominatorTree>();
+ AU.addRequired<DominatorTreeWrapperPass>();
}
/// abortIfBroken - If the module is broken and we are supposed to abort on
if (isa<Instruction>(V)) {
MessagesStr << *V << '\n';
} else {
- WriteAsOperand(MessagesStr, V, true, Mod);
+ V->printAsOperand(MessagesStr, true, Mod);
MessagesStr << '\n';
}
}
char Verifier::ID = 0;
INITIALIZE_PASS_BEGIN(Verifier, "verify", "Module Verifier", false, false)
INITIALIZE_PASS_DEPENDENCY(PreVerifier)
-INITIALIZE_PASS_DEPENDENCY(DominatorTree)
+INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
INITIALIZE_PASS_END(Verifier, "verify", "Module Verifier", false, false)
// Assert - We know that cond should be true, if not print an error message.