[llvm] [ObjectYAML][NFC] Hoist ContiguousBlobAccumulator into a shared header (PR #207306)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 2 19:26:49 PDT 2026
github-actions[bot] wrote:
<!--LLVM IDS CHECK COMMENT-->
:warning: LLVM ABI annotation checker, ids-check found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
Build idt from compnerd/ids, then for each changed header:
idt -p build/ --main-file <matching-source.cpp> \
--apply-fixits --inplace <header>
``````````
</details>
<details>
<summary>
View the diff from ids-check here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/ObjectYAML/ContiguousBlobAccumulator.h b/llvm/include/llvm/ObjectYAML/ContiguousBlobAccumulator.h
index 8ab506520..fc1fa1965 100644
--- a/llvm/include/llvm/ObjectYAML/ContiguousBlobAccumulator.h
+++ b/llvm/include/llvm/ObjectYAML/ContiguousBlobAccumulator.h
@@ -41,7 +41,7 @@ class ContiguousBlobAccumulator {
raw_svector_ostream OS;
Error ReachedLimitErr = Error::success();
- bool checkLimit(uint64_t Size);
+ LLVM_ABI bool checkLimit(uint64_t Size);
public:
ContiguousBlobAccumulator(uint64_t BaseOffset, uint64_t SizeLimit)
@@ -58,7 +58,7 @@ public:
}
/// \returns The new offset.
- uint64_t padToAlignment(unsigned Align);
+ LLVM_ABI uint64_t padToAlignment(unsigned Align);
raw_ostream *getRawOS(uint64_t Size) {
if (checkLimit(Size))
@@ -66,7 +66,7 @@ public:
return nullptr;
}
- void writeAsBinary(const BinaryRef &Bin, uint64_t N = UINT64_MAX);
+ LLVM_ABI void writeAsBinary(const BinaryRef &Bin, uint64_t N = UINT64_MAX);
void writeZeros(uint64_t Num) {
if (checkLimit(Num))
@@ -83,16 +83,16 @@ public:
OS.write(C);
}
- unsigned writeULEB128(uint64_t Val);
+ LLVM_ABI unsigned writeULEB128(uint64_t Val);
- unsigned writeSLEB128(int64_t Val);
+ LLVM_ABI unsigned writeSLEB128(int64_t Val);
template <typename T> void write(T Val, llvm::endianness E) {
if (checkLimit(sizeof(T)))
support::endian::write<T>(OS, Val, E);
}
- void updateDataAt(uint64_t Pos, void *Data, size_t Size);
+ LLVM_ABI void updateDataAt(uint64_t Pos, void *Data, size_t Size);
};
} // end namespace yaml
``````````
</details>
https://github.com/llvm/llvm-project/pull/207306
More information about the llvm-commits
mailing list