Skip to content

Commit fb1dc03

Browse files
jpsamaroomaleadt
authored andcommitted
Require ctx arg for ConstantInt, ConstantFP
1 parent 9ce9b3d commit fb1dc03

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/core/value/constant.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ end
6262

6363
# NOTE: fixed set where sizeof(T) does match the numerical width
6464
const SizeableInteger = Union{Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128}
65-
function ConstantInt(val::T, ctx::Context=GlobalContext()) where T<:SizeableInteger
65+
function ConstantInt(val::T, ctx::Context) where T<:SizeableInteger
6666
typ = IntType(sizeof(T)*8, ctx)
6767
return ConstantInt(typ, val, T<:Signed)
6868
end
@@ -82,11 +82,11 @@ identify(::Type{Value}, ::Val{API.LLVMConstantFPValueKind}) = ConstantFP
8282
ConstantFP(typ::FloatingPointType, val::Real) =
8383
ConstantFP(API.LLVMConstReal(typ, Cdouble(val)))
8484

85-
ConstantFP(val::Float16, ctx::Context=GlobalContext()) =
85+
ConstantFP(val::Float16, ctx::Context) =
8686
ConstantFP(HalfType(ctx), val)
87-
ConstantFP(val::Float32, ctx::Context=GlobalContext()) =
87+
ConstantFP(val::Float32, ctx::Context) =
8888
ConstantFP(FloatType(ctx), val)
89-
ConstantFP(val::Float64, ctx::Context=GlobalContext()) =
89+
ConstantFP(val::Float64, ctx::Context) =
9090
ConstantFP(DoubleType(ctx), val)
9191

9292
Base.convert(::Type{T}, val::ConstantFP) where {T<:AbstractFloat} =

0 commit comments

Comments
 (0)