mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-10-20 18:56:17 +00:00
Update LLVM from 21 to 22 (#505)
This commit is contained in:
1 parent
72d47e4d26
commit
8326aa3aed
49 files changed
+182
-181
No files matched your search
@@ -35,88 +35,90 @@ pub enum Attribute {
|
||||
NoBuiltin = 24,
|
||||
NoCallback = 25,
|
||||
NoCfCheck = 26,
|
||||
NoDivergenceSource = 27,
|
||||
NoDuplicate = 28,
|
||||
NoExt = 29,
|
||||
NoFree = 30,
|
||||
NoImplicitFloat = 31,
|
||||
NoInline = 32,
|
||||
NoMerge = 33,
|
||||
NoProfile = 34,
|
||||
NoRecurse = 35,
|
||||
NoRedZone = 36,
|
||||
NoReturn = 37,
|
||||
NoSanitizeBounds = 38,
|
||||
NoSanitizeCoverage = 39,
|
||||
NoSync = 40,
|
||||
NoUndef = 41,
|
||||
NoUnwind = 42,
|
||||
NonLazyBind = 43,
|
||||
NonNull = 44,
|
||||
NullPointerIsValid = 45,
|
||||
OptForFuzzing = 46,
|
||||
OptimizeForDebugging = 47,
|
||||
OptimizeForSize = 48,
|
||||
OptimizeNone = 49,
|
||||
PresplitCoroutine = 50,
|
||||
ReadNone = 51,
|
||||
ReadOnly = 52,
|
||||
Returned = 53,
|
||||
ReturnsTwice = 54,
|
||||
SExt = 55,
|
||||
SafeStack = 56,
|
||||
SanitizeAddress = 57,
|
||||
SanitizeHWAddress = 58,
|
||||
SanitizeMemTag = 59,
|
||||
SanitizeMemory = 60,
|
||||
SanitizeNumericalStability = 61,
|
||||
SanitizeRealtime = 62,
|
||||
SanitizeRealtimeBlocking = 63,
|
||||
SanitizeThread = 64,
|
||||
SanitizeType = 65,
|
||||
ShadowCallStack = 66,
|
||||
SkipProfile = 67,
|
||||
Speculatable = 68,
|
||||
SpeculativeLoadHardening = 69,
|
||||
StackProtect = 70,
|
||||
StackProtectReq = 71,
|
||||
StackProtectStrong = 72,
|
||||
StrictFP = 73,
|
||||
SwiftAsync = 74,
|
||||
SwiftError = 75,
|
||||
SwiftSelf = 76,
|
||||
WillReturn = 77,
|
||||
Writable = 78,
|
||||
WriteOnly = 79,
|
||||
ZExt = 80,
|
||||
//LastEnumAttr = 80,
|
||||
//FirstTypeAttr = 81,
|
||||
ByRef = 81,
|
||||
ByVal = 82,
|
||||
ElementType = 83,
|
||||
InAlloca = 84,
|
||||
Preallocated = 85,
|
||||
StructRet = 86,
|
||||
//LastTypeAttr = 86,
|
||||
//FirstIntAttr = 87,
|
||||
Alignment = 87,
|
||||
AllocKind = 88,
|
||||
AllocSize = 89,
|
||||
Captures = 90,
|
||||
Dereferenceable = 91,
|
||||
DereferenceableOrNull = 92,
|
||||
Memory = 93,
|
||||
NoFPClass = 94,
|
||||
StackAlignment = 95,
|
||||
UWTable = 96,
|
||||
VScaleRange = 97,
|
||||
//LastIntAttr = 97,
|
||||
//FirstConstantRangeAttr = 98,
|
||||
Range = 98,
|
||||
//LastConstantRangeAttr = 98,
|
||||
//FirstConstantRangeListAttr = 99,
|
||||
Initializes = 99,
|
||||
//LastConstantRangeListAttr = 99,
|
||||
NoCreateUndefOrPoison = 27,
|
||||
NoDivergenceSource = 28,
|
||||
NoDuplicate = 29,
|
||||
NoExt = 30,
|
||||
NoFree = 31,
|
||||
NoImplicitFloat = 32,
|
||||
NoInline = 33,
|
||||
NoMerge = 34,
|
||||
NoProfile = 35,
|
||||
NoRecurse = 36,
|
||||
NoRedZone = 37,
|
||||
NoReturn = 38,
|
||||
NoSanitizeBounds = 39,
|
||||
NoSanitizeCoverage = 40,
|
||||
NoSync = 41,
|
||||
NoUndef = 42,
|
||||
NoUnwind = 43,
|
||||
NonLazyBind = 44,
|
||||
NonNull = 45,
|
||||
NullPointerIsValid = 46,
|
||||
OptForFuzzing = 47,
|
||||
OptimizeForDebugging = 48,
|
||||
OptimizeForSize = 49,
|
||||
OptimizeNone = 50,
|
||||
PresplitCoroutine = 51,
|
||||
ReadNone = 52,
|
||||
ReadOnly = 53,
|
||||
Returned = 54,
|
||||
ReturnsTwice = 55,
|
||||
SExt = 56,
|
||||
SafeStack = 57,
|
||||
SanitizeAddress = 58,
|
||||
SanitizeAllocToken = 59,
|
||||
SanitizeHWAddress = 60,
|
||||
SanitizeMemTag = 61,
|
||||
SanitizeMemory = 62,
|
||||
SanitizeNumericalStability = 63,
|
||||
SanitizeRealtime = 64,
|
||||
SanitizeRealtimeBlocking = 65,
|
||||
SanitizeThread = 66,
|
||||
SanitizeType = 67,
|
||||
ShadowCallStack = 68,
|
||||
SkipProfile = 69,
|
||||
Speculatable = 70,
|
||||
SpeculativeLoadHardening = 71,
|
||||
StackProtect = 72,
|
||||
StackProtectReq = 73,
|
||||
StackProtectStrong = 74,
|
||||
StrictFP = 75,
|
||||
SwiftAsync = 76,
|
||||
SwiftError = 77,
|
||||
SwiftSelf = 78,
|
||||
WillReturn = 79,
|
||||
Writable = 80,
|
||||
WriteOnly = 81,
|
||||
ZExt = 82,
|
||||
//LastEnumAttr = 82,
|
||||
//FirstTypeAttr = 83,
|
||||
ByRef = 83,
|
||||
ByVal = 84,
|
||||
ElementType = 85,
|
||||
InAlloca = 86,
|
||||
Preallocated = 87,
|
||||
StructRet = 88,
|
||||
//LastTypeAttr = 88,
|
||||
//FirstIntAttr = 89,
|
||||
Alignment = 89,
|
||||
AllocKind = 90,
|
||||
AllocSize = 91,
|
||||
Captures = 92,
|
||||
Dereferenceable = 93,
|
||||
DereferenceableOrNull = 94,
|
||||
Memory = 95,
|
||||
NoFPClass = 96,
|
||||
StackAlignment = 97,
|
||||
UWTable = 98,
|
||||
VScaleRange = 99,
|
||||
//LastIntAttr = 99,
|
||||
//FirstConstantRangeAttr = 100,
|
||||
Range = 100,
|
||||
//LastConstantRangeAttr = 100,
|
||||
//FirstConstantRangeListAttr = 101,
|
||||
Initializes = 101,
|
||||
//LastConstantRangeListAttr = 101,
|
||||
}
|
||||
|
||||
impl TryFrom<&str> for Attribute {
|
||||
|
||||
@@ -287,7 +287,6 @@ impl<'ctx> Context<'ctx> {
|
||||
) -> anyhow::Result<Build> {
|
||||
self.link_polkavm_exports(contract_path)?;
|
||||
self.link_immutable_data(contract_path)?;
|
||||
|
||||
let target_machine = TargetMachine::new(Target::PVM, self.optimizer.settings())?;
|
||||
self.module().set_triple(&target_machine.get_triple());
|
||||
|
||||
|
||||
@@ -59,10 +59,10 @@ impl TargetMachine {
|
||||
}
|
||||
|
||||
/// Writes the LLVM module to a memory buffer.
|
||||
pub fn write_to_memory_buffer<'ctx>(
|
||||
pub fn write_to_memory_buffer(
|
||||
&self,
|
||||
module: &inkwell::module::Module<'ctx>,
|
||||
) -> Result<inkwell::memory_buffer::MemoryBuffer<'ctx>, inkwell::support::LLVMString> {
|
||||
module: &inkwell::module::Module,
|
||||
) -> Result<inkwell::memory_buffer::MemoryBuffer<'static>, inkwell::support::LLVMString> {
|
||||
match self.target {
|
||||
Target::PVM => self
|
||||
.target_machine
|
||||
|
||||
Reference in new issue
Block a user