Remove uses of StringMap::GetOrCreateValue in favor of stl-compatible API usage
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 19 Nov 2014 03:05:07 +0000 (03:05 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 19 Nov 2014 03:05:07 +0000 (03:05 +0000)
llvm-svn: 222305

clang-tools-extra/clang-tidy/ClangTidyOptions.cpp

index bdd503b..47be061 100644 (file)
@@ -190,10 +190,10 @@ const ClangTidyOptions &FileOptionsProvider::getOptions(StringRef FileName) {
       while (Path != CurrentPath) {
         DEBUG(llvm::dbgs() << "Caching configuration for path " << Path
                            << ".\n");
-        CachedOptions.GetOrCreateValue(Path, *Result);
+        CachedOptions[Path] = *Result;
         Path = llvm::sys::path::parent_path(Path);
       }
-      return CachedOptions.GetOrCreateValue(Path, *Result).getValue();
+      return CachedOptions[Path] = *Result;
     }
   }
 }