Fix Clang-tidy modernize-use-nullptr warnings in source directories and generated files; other minor cleanups.
Patch by Eugene Zelenko!
Differential Revision: http://reviews.llvm.org/D13321
llvm-svn: 249482
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp
index 87cd222..49586f4 100644
--- a/llvm/lib/IR/Module.cpp
+++ b/llvm/lib/IR/Module.cpp
@@ -29,6 +29,7 @@
#include <algorithm>
#include <cstdarg>
#include <cstdlib>
+
using namespace llvm;
//===----------------------------------------------------------------------===//
@@ -81,7 +82,6 @@
return new RandomNumberGenerator(Salt);
}
-
/// getNamedValue - Return the first global value in the module with
/// the specified name, of arbitrary type. This method returns null
/// if a global with the specified name is not found.
@@ -481,7 +481,7 @@
PICLevel::Level Module::getPICLevel() const {
auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("PIC Level"));
- if (Val == NULL)
+ if (!Val)
return PICLevel::Default;
return static_cast<PICLevel::Level>(