diff options
author | Hans Wennborg <hans@hanshq.net> | 2015-10-06 23:24:35 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2015-10-06 23:24:35 +0000 |
commit | 083ca9bb3233fb4df575bfb8c4198e3f9d6e3acd (patch) | |
tree | 81cfb3fc70e644d0ab252b18b9fabf6b764da86a /llvm/lib/Transforms/IPO/MergeFunctions.cpp | |
parent | 44780acd913643391779768c0b1d9259e294dbe8 (diff) | |
download | llvm-083ca9bb3233fb4df575bfb8c4198e3f9d6e3acd.zip llvm-083ca9bb3233fb4df575bfb8c4198e3f9d6e3acd.tar.gz llvm-083ca9bb3233fb4df575bfb8c4198e3f9d6e3acd.tar.bz2 |
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
Diffstat (limited to 'llvm/lib/Transforms/IPO/MergeFunctions.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/MergeFunctions.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/IPO/MergeFunctions.cpp b/llvm/lib/Transforms/IPO/MergeFunctions.cpp index d7bfed1..8b7db54 100644 --- a/llvm/lib/Transforms/IPO/MergeFunctions.cpp +++ b/llvm/lib/Transforms/IPO/MergeFunctions.cpp @@ -113,6 +113,7 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" #include <vector> + using namespace llvm; #define DEBUG_TYPE "mergefunc" @@ -465,9 +466,9 @@ public: F = G; } - void release() { F = 0; } + void release() { F = nullptr; } }; -} +} // end anonymous namespace int FunctionComparator::cmpNumbers(uint64_t L, uint64_t R) const { if (L < R) return -1; @@ -535,6 +536,7 @@ int FunctionComparator::cmpAttrs(const AttributeSet L, } return 0; } + int FunctionComparator::cmpRangeMetadata(const MDNode* L, const MDNode* R) const { if (L == R) @@ -770,7 +772,6 @@ int FunctionComparator::cmpGlobalValues(GlobalValue *L, GlobalValue* R) { /// defines total ordering among the types set. /// See method declaration comments for more details. int FunctionComparator::cmpTypes(Type *TyL, Type *TyR) const { - PointerType *PTyL = dyn_cast<PointerType>(TyL); PointerType *PTyR = dyn_cast<PointerType>(TyR); @@ -1164,7 +1165,6 @@ int FunctionComparator::cmpBasicBlocks(const BasicBlock *BBL, // Test whether the two functions have equivalent behaviour. int FunctionComparator::compare() { - sn_mapL.clear(); sn_mapR.clear(); @@ -1400,7 +1400,7 @@ private: bool HasGlobalAliases; }; -} // end anonymous namespace +} // end anonymous namespace char MergeFunctions::ID = 0; INITIALIZE_PASS(MergeFunctions, "mergefunc", "Merge Functions", false, false) |