diff options
Diffstat (limited to 'clang/lib/CodeGen/CodeGenPGO.h')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenPGO.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenPGO.h b/clang/lib/CodeGen/CodeGenPGO.h index 98e5b1fd1ac..c4348085882 100644 --- a/clang/lib/CodeGen/CodeGenPGO.h +++ b/clang/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]; } |

