Commit 68a74ef9 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Fix embedding of constant ints

Allow 64-bit constants.  not sure how we didn't run into this before
parent e5db59e7
......@@ -99,11 +99,11 @@ llvm::Constant* embedConstantPtr(const void* addr, llvm::Type* type) {
return ptr_val;
}
llvm::Constant* getConstantInt(int n, llvm::Type* t) {
llvm::Constant* getConstantInt(int64_t n, llvm::Type* t) {
return llvm::ConstantInt::get(t, n);
}
llvm::Constant* getConstantInt(int n) {
llvm::Constant* getConstantInt(int64_t n) {
return getConstantInt(n, g.i64);
}
......
......@@ -28,9 +28,9 @@ namespace pyston {
llvm::Constant* getStringConstantPtr(const std::string& str);
llvm::Constant* getStringConstantPtr(const char* str);
llvm::Constant* embedConstantPtr(const void* addr, llvm::Type*);
llvm::Constant* getConstantInt(int val);
llvm::Constant* getConstantInt(int64_t val);
llvm::Constant* getConstantDouble(double val);
llvm::Constant* getConstantInt(int val, llvm::Type*);
llvm::Constant* getConstantInt(int64_t val, llvm::Type*);
void dumpPrettyIR(llvm::Function* f);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment