diff options
author | Vedant Kumar <vsk@apple.com> | 2016-10-18 00:23:27 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2016-10-18 00:23:27 +0000 |
commit | e5e0f9d13f290533374e90b61353e1ffcca86560 (patch) | |
tree | bb4999edaf6d7a7721c9d4461d7f871ee378e846 /include/clang/Basic/SourceManager.h | |
parent | 6e7788f899fa71d1b99f9c81131119dbace85445 (diff) |
[Basic] unique_ptr-ify SourceManager::MacroArgsCacheMap (NFC)
Differential Revision: https://reviews.llvm.org/D25711
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284442 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceManager.h')
-rw-r--r-- | include/clang/Basic/SourceManager.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index 45187e58cb..7f1b31f69b 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -693,7 +693,8 @@ class SourceManager : public RefCountedBase<SourceManager> { /// source location. typedef std::map<unsigned, SourceLocation> MacroArgsMap; - mutable llvm::DenseMap<FileID, MacroArgsMap *> MacroArgsCacheMap; + mutable llvm::DenseMap<FileID, std::unique_ptr<MacroArgsMap>> + MacroArgsCacheMap; /// \brief The stack of modules being built, which is used to detect /// cycles in the module dependency graph as modules are being built, as @@ -1672,7 +1673,7 @@ private: std::pair<FileID, unsigned> getDecomposedSpellingLocSlowCase(const SrcMgr::SLocEntry *E, unsigned Offset) const; - void computeMacroArgsCache(MacroArgsMap *&MacroArgsCache, FileID FID) const; + void computeMacroArgsCache(MacroArgsMap &MacroArgsCache, FileID FID) const; void associateFileChunkWithMacroArgExp(MacroArgsMap &MacroArgsCache, FileID FID, SourceLocation SpellLoc, |