Skip to content

Commit 3be3c61

Browse files
committed
Work around bitcode incompatibility with upstream
Ensure that attributes are encoded using the same values as upstream. This fixes an issue with combining a HIP environment compiled from amd-staging with a Clang compiled from a different LLVM branch.
1 parent c5ef332 commit 3be3c61

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

llvm/include/llvm/Bitcode/LLVMBitCodes.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -791,9 +791,15 @@ enum AttributeKindCodes {
791791
ATTR_KIND_CORO_ELIDE_SAFE = 98,
792792
ATTR_KIND_NO_EXT = 99,
793793
ATTR_KIND_NO_DIVERGENCE_SOURCE = 100,
794-
ATTR_KIND_SANITIZED_PADDED_GLOBAL = 101,
795-
ATTR_KIND_SANITIZE_TYPE = 102,
796-
ATTR_KIND_CAPTURES = 103,
794+
ATTR_KIND_SANITIZE_TYPE = 101,
795+
ATTR_KIND_CAPTURES = 102,
796+
797+
// TODO: Get rid of this.
798+
// There really shouldn't be incompatible bitcode changes specific to AMD
799+
// branches because that is prone to break compiler developer's workflows. In
800+
// the meantime, try to reduce the blast radius by using bitcode values that
801+
// are extremely unlikely to be used upstream.
802+
ATTR_KIND_SANITIZED_PADDED_GLOBAL = 9999,
797803
};
798804

799805
enum ComdatSelectionKindCodes {

0 commit comments

Comments
 (0)