Skip to content

Commit 327084a

Browse files
committed
Add Marker attribute to LLVMBitCodes.h and BitcodeReader.cpp***
***Add encoding for Marker attribute in BitcodeWriter.cpp
1 parent e02b5d2 commit 327084a

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

llvm/include/llvm/Bitcode/LLVMBitCodes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,7 @@ enum AttributeKindCodes {
732732
ATTR_KIND_WRITABLE = 97,
733733
ATTR_KIND_CORO_ONLY_DESTROY_WHEN_COMPLETE = 98,
734734
ATTR_KIND_DEAD_ON_UNWIND = 99,
735+
ATTR_KIND_MARKER = 100,
735736
};
736737

737738
enum ComdatSelectionKindCodes {

llvm/lib/Bitcode/Reader/BitcodeReader.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2092,6 +2092,8 @@ static Attribute::AttrKind getAttrFromCode(uint64_t Code) {
20922092
return Attribute::Hot;
20932093
case bitc::ATTR_KIND_PRESPLIT_COROUTINE:
20942094
return Attribute::PresplitCoroutine;
2095+
case bitc::ATTR_KIND_MARKER:
2096+
return Attribute::Marker;
20952097
case bitc::ATTR_KIND_VOLATILE_FUNCTION:
20962098
return Attribute::IsVolatileFunction;
20972099
case bitc::ATTR_KIND_DISABLE_BLOCK_PLACEMENT_PASS:

llvm/lib/Bitcode/Writer/BitcodeWriter.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,8 @@ static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind) {
834834
case Attribute::EmptyKey:
835835
case Attribute::TombstoneKey:
836836
llvm_unreachable("Trying to encode EmptyKey/TombstoneKey");
837+
case Attribute::Marker:
838+
return bitc::ATTR_KIND_MARKER;
837839
case Attribute::IsVolatileFunction:
838840
return bitc::ATTR_KIND_VOLATILE_FUNCTION;
839841
case Attribute::DisableBlockPlacementPass:

0 commit comments

Comments
 (0)