diff options
Diffstat (limited to 'tools/llvm2cpp/CppWriter.cpp')
-rw-r--r-- | tools/llvm2cpp/CppWriter.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/llvm2cpp/CppWriter.cpp b/tools/llvm2cpp/CppWriter.cpp index 2d0a3be0df..cc04288e74 100644 --- a/tools/llvm2cpp/CppWriter.cpp +++ b/tools/llvm2cpp/CppWriter.cpp @@ -680,9 +680,7 @@ void CppWriter::printConstant(const Constant *CV) { << (CB->getValue() ? "true" : "false") << ");"; } else if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) { Out << "ConstantInt* " << constName << " = ConstantInt::get(" - << typeName << ", " - << (CV->getType()->isSigned() ? CI->getSExtValue() : CI->getZExtValue()) - << ");"; + << typeName << ", " << CI->getZExtValue() << ");"; } else if (isa<ConstantAggregateZero>(CV)) { Out << "ConstantAggregateZero* " << constName << " = ConstantAggregateZero::get(" << typeName << ");"; |