mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-28 17:06:31 +00:00
unbreak i1 constants with the cpp writer, eliminate special case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33133 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e9d4fa7a92
commit
f6e7bb4a5e
@ -666,10 +666,6 @@ void CppWriter::printConstant(const Constant *CV) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
|
if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
|
||||||
if (CI->getType() == Type::Int1Ty)
|
|
||||||
Out << "ConstantInt* " << constName << " = ConstantInt::get("
|
|
||||||
<< (CI->getZExtValue() ? "true" : "false") << ");";
|
|
||||||
else
|
|
||||||
Out << "ConstantInt* " << constName << " = ConstantInt::get("
|
Out << "ConstantInt* " << constName << " = ConstantInt::get("
|
||||||
<< typeName << ", " << CI->getZExtValue() << ");";
|
<< typeName << ", " << CI->getZExtValue() << ");";
|
||||||
} else if (isa<ConstantAggregateZero>(CV)) {
|
} else if (isa<ConstantAggregateZero>(CV)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user