mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-15 00:13:43 +00:00
all: remove support for LLVM 11 and LLVM 12
This removes a lot of backwards compatibility cruft and makes it possible to start using features that need LLVM 13 or newer. For example: * https://github.com/tinygo-org/tinygo/pull/2637 * https://github.com/tinygo-org/tinygo/pull/2830
This commit is contained in:
committed by
Ron Evans
parent
5afb63df60
commit
5c23f6fb6c
@@ -18,17 +18,3 @@ func ApplyFunctionSections(mod llvm.Module) {
|
||||
llvmFn = llvm.NextFunction(llvmFn)
|
||||
}
|
||||
}
|
||||
|
||||
// DisableTailCalls adds the "disable-tail-calls"="true" function attribute to
|
||||
// all functions. This may be necessary, in particular to avoid an error with
|
||||
// WebAssembly in LLVM 11.
|
||||
func DisableTailCalls(mod llvm.Module) {
|
||||
attribute := mod.Context().CreateStringAttribute("disable-tail-calls", "true")
|
||||
llvmFn := mod.FirstFunction()
|
||||
for !llvmFn.IsNil() {
|
||||
if !llvmFn.IsDeclaration() {
|
||||
llvmFn.AddFunctionAttr(attribute)
|
||||
}
|
||||
llvmFn = llvm.NextFunction(llvmFn)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user