BumpPtrAllocator: use uintptr_t when aligning addresses to avoid undefined behaviour
[oota-llvm.git] / include / llvm / PassAnalysisSupport.h
index a581802c47c08b796c1474148eaa9ee5f96fa03b..9164305418092385d0613c3ca238ca014ca7397f 100644 (file)
@@ -129,7 +129,7 @@ public:
 
   // 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;
@@ -182,7 +182,7 @@ AnalysisType *Pass::getAnalysisIfAvailable() const {
   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