aboutsummaryrefslogtreecommitdiff
path: root/src/rustllvm
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2011-05-07 18:54:23 +0000
committerGraydon Hoare <[email protected]>2011-05-07 18:54:23 +0000
commitdb3b9a4992c672d53070a1c8ddb4458a8696b057 (patch)
tree03e80470bd3093ef53265d63a06dc7ae8593dc97 /src/rustllvm
parentrustc: Make llvm_err() conform to Postel's law a little better (diff)
downloadrust-db3b9a4992c672d53070a1c8ddb4458a8696b057.tar.xz
rust-db3b9a4992c672d53070a1c8ddb4458a8696b057.zip
Stop stringifying integers to get integral constants.
Diffstat (limited to 'src/rustllvm')
-rw-r--r--src/rustllvm/RustWrapper.cpp5
-rw-r--r--src/rustllvm/rustllvm.def.in1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index b1705f10..b5769519 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);
+}
diff --git a/src/rustllvm/rustllvm.def.in b/src/rustllvm/rustllvm.def.in
index 69e79210..2da66c24 100644
--- a/src/rustllvm/rustllvm.def.in
+++ b/src/rustllvm/rustllvm.def.in
@@ -2,6 +2,7 @@ LLVMRustCreateMemoryBufferWithContentsOfFile
LLVMRustWriteOutputFile
LLVMRustGetLastError
LLVMRustGetHostTriple
+LLVMRustConstSmallInt
LLVMRustParseBitcode
LLVMLinkModules
LLVMCreateObjectFile