[BitCode] Add noprofile to getAttrFromCode()
After D104475 / D104658, building the Linux kernel with ThinLTO is broken: ld.lld: error: Unknown attribute kind (73) (Producer: 'LLVM13.0.0git' Reader: 'LLVM 13.0.0git') getAttrFromCode() has never handled this attribute so it is written during the ThinLTO phase but it cannot be handled during the linking phase. Add noprofile to getAttrFromCode() so that disassembly works properly. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D104995
This commit is contained in:
@@ -1439,6 +1439,8 @@ static Attribute::AttrKind getAttrFromCode(uint64_t Code) {
|
||||
return Attribute::NoSync;
|
||||
case bitc::ATTR_KIND_NOCF_CHECK:
|
||||
return Attribute::NoCfCheck;
|
||||
case bitc::ATTR_KIND_NO_PROFILE:
|
||||
return Attribute::NoProfile;
|
||||
case bitc::ATTR_KIND_NO_UNWIND:
|
||||
return Attribute::NoUnwind;
|
||||
case bitc::ATTR_KIND_NO_SANITIZE_COVERAGE:
|
||||
|
||||
Reference in New Issue
Block a user