diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-05-21 05:09:00 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-05-21 05:09:00 +0000 |
commit | d1008e5c93536222903523b70245ec66876bbad5 (patch) | |
tree | 497a27f59709ab02c2dedda0150112ece7b52023 /lib/CodeGen/CodeGenPGO.h | |
parent | 7a1672c5c23b8a5707282062b916ca6c447da7a1 (diff) | |
download | clang-d1008e5c93536222903523b70245ec66876bbad5.tar.gz |
[C++11] Use 'nullptr'. CodeGen edition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209272 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenPGO.h')
-rw-r--r-- | lib/CodeGen/CodeGenPGO.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/CodeGenPGO.h b/lib/CodeGen/CodeGenPGO.h index 98e5b1fd1a..c434808588 100644 --- a/lib/CodeGen/CodeGenPGO.h +++ b/lib/CodeGen/CodeGenPGO.h @@ -45,13 +45,13 @@ private: public: CodeGenPGO(CodeGenModule &CGM) - : CGM(CGM), NumRegionCounters(0), FunctionHash(0), RegionCounters(0), - CurrentRegionCount(0) {} + : CGM(CGM), NumRegionCounters(0), FunctionHash(0), + RegionCounters(nullptr), CurrentRegionCount(0) {} /// Whether or not we have PGO region data for the current function. This is /// false both when we have no data at all and when our data has been /// discarded. - bool haveRegionCounts() const { return RegionCounts != 0; } + bool haveRegionCounts() const { return RegionCounts != nullptr; } /// Get the string used to identify this function in the profile data. /// For functions with local linkage, this includes the main file name. @@ -128,7 +128,7 @@ private: /// Return the region counter for the given statement. This should only be /// called on statements that have a dedicated counter. unsigned getRegionCounter(const Stmt *S) { - if (RegionCounterMap == 0) + if (!RegionCounterMap) return 0; return (*RegionCounterMap)[S]; } |