about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2011-05-07 18:54:23 +0000
committerGraydon Hoare <graydon@mozilla.com>2011-05-07 18:54:23 +0000
commitdb3b9a4992c672d53070a1c8ddb4458a8696b057 (patch)
tree03e80470bd3093ef53265d63a06dc7ae8593dc97 /src/rustllvm/RustWrapper.cpp
parenta71fda40b865e23f0d191174f4584298534f2f75 (diff)
downloadrust-db3b9a4992c672d53070a1c8ddb4458a8696b057.tar.gz
rust-db3b9a4992c672d53070a1c8ddb4458a8696b057.zip
Stop stringifying integers to get integral constants.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
-rw-r--r--src/rustllvm/RustWrapper.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index b1705f10ae3..b57695199f9 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -116,3 +116,8 @@ extern "C" const char *LLVMRustGetHostTriple(void)
   static std::string str = llvm::sys::getHostTriple();
   return str.c_str();
 }
+
+extern "C" LLVMValueRef LLVMRustConstSmallInt(LLVMTypeRef IntTy, unsigned N,
+                                              LLVMBool SignExtend) {
+  return LLVMConstInt(IntTy, (unsigned long long)N, SignExtend);
+}