Skip to content

Commit c2e04e8

Browse files
Fix copy-paste error causing PtrToInt to use IntToPtr (#56)
1 parent 767cc2f commit c2e04e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/LLVM/IRBuilder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ public class IRBuilder {
10751075
/// - returns: An integer value representing the value of the given pointer
10761076
/// converted to the given integer type.
10771077
public func buildPtrToInt(_ val: IRValue, type: IntType, name: String = "") -> IRValue {
1078-
return LLVMBuildIntToPtr(llvm, val.asLLVM(), type.asLLVM(), name)
1078+
return LLVMBuildPtrToInt(llvm, val.asLLVM(), type.asLLVM(), name)
10791079
}
10801080

10811081
/// Builds an integer-to-floating instruction to convert the given integer

0 commit comments

Comments
 (0)