//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_PASS_ANALYSIS_SUPPORT_H
-#define LLVM_PASS_ANALYSIS_SUPPORT_H
+#ifndef LLVM_PASSANALYSISSUPPORT_H
+#define LLVM_PASSANALYSISSUPPORT_H
-#include "llvm/Pass.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/Pass.h"
#include <vector>
namespace llvm {
void setPreservesAll() { PreservesAll = true; }
bool getPreservesAll() const { return PreservesAll; }
- /// setPreservesCFG - This function should be called by the pass, if they do
+ /// setPreservesCFG - This function should be called by the pass, iff they do
/// not:
///
/// 1. Add or remove basic blocks from the function
// Find pass that is implementing PI.
Pass *findImplPass(AnalysisID PI) {
- Pass *ResultPass = 0;
+ Pass *ResultPass = nullptr;
for (unsigned i = 0; i < AnalysisImpls.size() ; ++i) {
if (AnalysisImpls[i].first == PI) {
ResultPass = AnalysisImpls[i].second;
const void *PI = &AnalysisType::ID;
Pass *ResultPass = Resolver->getAnalysisIfAvailable(PI, true);
- if (ResultPass == 0) return 0;
+ if (!ResultPass) return nullptr;
// Because the AnalysisType may not be a subclass of pass (for
// AnalysisGroups), we use getAdjustedAnalysisPointer here to potentially