diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-11-19 03:06:06 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-11-19 03:06:06 +0000 |
commit | 8ee697fb1b40b4b5c3b34176ae60add0a815c44d (patch) | |
tree | 079c5e6c267ab1e1f04f9d66c0b4b921d0cb3e22 /unittests | |
parent | 14b0eac48e69f7bea5815c1614310497fdc49c30 (diff) |
Standardize on StringMap::insert, removing uses of StringMap::GetOrCreateValue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222306 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/Tooling/RefactoringTest.cpp | 3 | ||||
-rw-r--r-- | unittests/Tooling/RewriterTestContext.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/unittests/Tooling/RefactoringTest.cpp b/unittests/Tooling/RefactoringTest.cpp index 4935bdd806..a026a94261 100644 --- a/unittests/Tooling/RefactoringTest.cpp +++ b/unittests/Tooling/RefactoringTest.cpp @@ -237,7 +237,8 @@ public: const FileEntry *File = Context.Files.getFile(Path); assert(File != nullptr); - StringRef Found = TemporaryFiles.GetOrCreateValue(Name, Path.str()).second; + StringRef Found = + TemporaryFiles.insert(std::make_pair(Name, Path.str())).first->second; assert(Found == Path); (void)Found; return Context.Sources.createFileID(File, SourceLocation(), SrcMgr::C_User); diff --git a/unittests/Tooling/RewriterTestContext.h b/unittests/Tooling/RewriterTestContext.h index 78ee788a1e..112efac52e 100644 --- a/unittests/Tooling/RewriterTestContext.h +++ b/unittests/Tooling/RewriterTestContext.h @@ -72,7 +72,8 @@ class RewriterTestContext { const FileEntry *File = Files.getFile(Path); assert(File != nullptr); - StringRef Found = TemporaryFiles.GetOrCreateValue(Name, Path.str()).second; + StringRef Found = + TemporaryFiles.insert(std::make_pair(Name, Path.str())).first->second; assert(Found == Path); (void)Found; return Sources.createFileID(File, SourceLocation(), SrcMgr::C_User); |