[compiler-rt] [llvm] [InstrFDO]Allow indexed profile reader to parse compatible future versions and returns errors for incompatible ones. (PR #88212)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 7 13:29:31 PDT 2024
================
@@ -195,15 +195,32 @@ InstrProfWriter::InstrProfWriter(
InstrProfWriter::~InstrProfWriter() { delete InfoObj; }
-// Internal interface for testing purpose only.
+// Begin: Internal interface for testing purpose only.
void InstrProfWriter::setValueProfDataEndianness(llvm::endianness Endianness) {
InfoObj->ValueProfDataEndianness = Endianness;
}
-void InstrProfWriter::setOutputSparse(bool Sparse) {
- this->Sparse = Sparse;
+void InstrProfWriter::setOutputSparse(bool Sparse) { this->Sparse = Sparse; }
+
+void InstrProfWriter::setProfileVersion(uint32_t Version) {
+ ProfileVersion = std::make_optional(Version);
----------------
kazutakahirata wrote:
You can just "assign":
```suggestion
ProfileVersion = Version;
```
https://github.com/llvm/llvm-project/pull/88212
More information about the llvm-commits
mailing list