[PATCH] D130563: Skip padding between buildid and filenames.
Krzysztof Pszeniczny via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 26 12:24:46 PDT 2022
amharc updated this revision to Diff 447797.
amharc added a comment.
Rebase to fix test failures.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130563/new/
https://reviews.llvm.org/D130563
Files:
bolt/lib/Profile/DataAggregator.cpp
bolt/unittests/Profile/DataAggregator.cpp
Index: bolt/unittests/Profile/DataAggregator.cpp
===================================================================
--- bolt/unittests/Profile/DataAggregator.cpp
+++ bolt/unittests/Profile/DataAggregator.cpp
@@ -41,11 +41,14 @@
StringRef AllValidBuildIDs = "0000 File0\n"
"1111 File1\n"
- "2222 File2\n";
+ "2222 File2\n"
+ "333 File3\n";
DA.setParsingBuffer(AllValidBuildIDs);
ASSERT_TRUE(DA.hasAllBuildIDs());
FileName = DA.getFileNameForBuildID("1234");
ASSERT_FALSE(FileName);
FileName = DA.getFileNameForBuildID("2222");
ASSERT_EQ(*FileName, "File2");
+ FileName = DA.getFileNameForBuildID("333");
+ ASSERT_EQ(*FileName, "File3");
}
Index: bolt/lib/Profile/DataAggregator.cpp
===================================================================
--- bolt/lib/Profile/DataAggregator.cpp
+++ bolt/lib/Profile/DataAggregator.cpp
@@ -2144,6 +2144,8 @@
if (std::error_code EC = BuildIDStr.getError())
return NoneType();
+ consumeAllRemainingFS();
+
// If one of the strings is missing, don't issue a parsing error, but still
// do not return a value.
if (ParsingBuf[0] == '\n')
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130563.447797.patch
Type: text/x-patch
Size: 1246 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220726/bbd5771d/attachment.bin>
More information about the llvm-commits
mailing list