diff options
author | Petr Hosek <phosek@google.com> | 2021-02-24 14:01:42 -0800 |
---|---|---|
committer | Petr Hosek <phosek@google.com> | 2021-02-24 14:01:42 -0800 |
commit | ae7528a34e2771ba4f0741e4941f78810854103d (patch) | |
tree | b5f58d2ecb9102e791cc9ffeb738278ade51ad55 /llvm/unittests/ProfileData/CoverageMappingTest.cpp | |
parent | a7cee55762c6564de9dfc90985fe5c14cad7f9ee (diff) | |
download | llvm-ae7528a34e2771ba4f0741e4941f78810854103d.zip llvm-ae7528a34e2771ba4f0741e4941f78810854103d.tar.gz llvm-ae7528a34e2771ba4f0741e4941f78810854103d.tar.bz2 |
Revert "[Profile] Include a few asserts in coverage mapping test"
This reverts commit 80f329bcd0281c11062879025761d0657167fe8b.
Diffstat (limited to 'llvm/unittests/ProfileData/CoverageMappingTest.cpp')
-rw-r--r-- | llvm/unittests/ProfileData/CoverageMappingTest.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/unittests/ProfileData/CoverageMappingTest.cpp b/llvm/unittests/ProfileData/CoverageMappingTest.cpp index 3f9a00b..d1bb87a 100644 --- a/llvm/unittests/ProfileData/CoverageMappingTest.cpp +++ b/llvm/unittests/ProfileData/CoverageMappingTest.cpp @@ -145,10 +145,8 @@ struct CoverageMappingTest : ::testing::TestWithParam<std::pair<bool, bool>> { unsigned getGlobalFileIndex(StringRef Name) { auto R = Files.find(Name); - if (R != Files.end()) { - assert(R->second > 0 && "got index of compilation dir"); + if (R != Files.end()) return R->second; - } unsigned Index = Files.size() + 1; Files.try_emplace(Name, Index); return Index; @@ -163,10 +161,8 @@ struct CoverageMappingTest : ::testing::TestWithParam<std::pair<bool, bool>> { auto &CurrentFunctionFileMapping = InputFunctions.back().ReverseVirtualFileMapping; auto R = CurrentFunctionFileMapping.find(GlobalIndex); - if (R != CurrentFunctionFileMapping.end()) { - assert(R->second > 0 && "got index of compilation dir"); + if (R != CurrentFunctionFileMapping.end()) return R->second; - } unsigned IndexInFunction = CurrentFunctionFileMapping.size(); CurrentFunctionFileMapping.insert( std::make_pair(GlobalIndex, IndexInFunction)); |