llvm.org GIT mirror llvm / cdcc59f
InstrProf: Fix unit test which accidentally used a duplicate name This unit test constructed some profile records incorrectly. One of the records had a duplicate name: adding that record into the writer caused an error unrelated to what needed to be tested. Reported by David Blaikie! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307596 91177308-0d34-0410-b5e6-96231b3b80d8 Vedant Kumar 2 years ago
1 changed file(s) with 1 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
995995 TEST_F(SparseInstrProfTest, preserve_no_records) {
996996 Writer.addRecord({"foo", 0x1234, {0}}, Err);
997997 Writer.addRecord({"bar", 0x4321, {0, 0}}, Err);
998 // FIXME: I'm guessing this data should be different, but the original author
999 // should check/update this test so it doesn't produce errors.
1000 Writer.addRecord({"bar", 0x4321, {0, 0, 0}},
1001 [](Error E) { consumeError(std::move(E)); });
998 Writer.addRecord({"baz", 0x4321, {0, 0, 0}}, Err);
1002999
10031000 auto Profile = Writer.writeBuffer();
10041001 readProfile(std::move(Profile));