From ea3a1eae38871b40639eca64998101c0647e0781 Mon Sep 17 00:00:00 2001 From: Harlan Date: Sun, 29 Jan 2017 01:17:57 -0500 Subject: [PATCH] Fix copy-paste error causing PtrToInt to use IntToPtr --- Sources/LLVM/IRBuilder.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/LLVM/IRBuilder.swift b/Sources/LLVM/IRBuilder.swift index ac02d1c4..e82165c8 100644 --- a/Sources/LLVM/IRBuilder.swift +++ b/Sources/LLVM/IRBuilder.swift @@ -1075,7 +1075,7 @@ public class IRBuilder { /// - returns: An integer value representing the value of the given pointer /// converted to the given integer type. public func buildPtrToInt(_ val: IRValue, type: IntType, name: String = "") -> IRValue { - return LLVMBuildIntToPtr(llvm, val.asLLVM(), type.asLLVM(), name) + return LLVMBuildPtrToInt(llvm, val.asLLVM(), type.asLLVM(), name) } /// Builds an integer-to-floating instruction to convert the given integer