================
@@ -1074,14 +1074,43 @@ void 
APINotesWriter::Implementation::writeGlobalVariableBlock(
 }
 
 namespace {
+void emitBoundsSafetyInfo(raw_ostream &OS, const BoundsSafetyInfo &BSI) {
+  llvm::support::endian::Writer writer(OS, llvm::endianness::little);
+  uint8_t flags = 0;
+  if (auto kind = BSI.getKind()) {
+    flags |= 0x01;                // 1 bit
+    flags |= (uint8_t)*kind << 1; // 3 bits
----------------
compnerd wrote:

@hnrklssn I'm worried that either a miscompilation or an accidental change 
spills over and we silently truncate because we have been handed a value more 
than 3-bits.

https://github.com/llvm/llvm-project/pull/185257
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to