diff options
author | Chris Lattner <sabre@nondot.org> | 2003-04-25 18:28:44 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-04-25 18:28:44 +0000 |
commit | 7471c486c03e36721bd43988774b1c43b9cc54e9 (patch) | |
tree | 13d0ed3fded285309cfa320bff5a173dcdd6d080 /lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | |
parent | c8cff9e6432a901166de2c7488d811aabfa20f48 (diff) |
Only do the %ld -> %lld promotion when running a 64 bit bytecode on a 32 bit host
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5942 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp')
-rw-r--r-- | lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp index f8e1288f1d..aa900ea3b4 100644 --- a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp +++ b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp @@ -377,7 +377,8 @@ GenericValue lle_X_sprintf(FunctionType *M, const vector<GenericValue> &Args) { case 'u': case 'o': case 'x': case 'X': if (HowLong >= 1) { - if (HowLong == 1) { + if (HowLong == 1 && TheInterpreter->getModule().has64BitPointers() && + sizeof(long) < sizeof(long long)) { // Make sure we use %lld with a 64 bit argument because we might be // compiling LLI on a 32 bit compiler. unsigned Size = strlen(FmtBuf); |