mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-13 09:33:50 +00:00
Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176765 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
60d16a27da
commit
e629a33d16
@ -22,8 +22,8 @@ using namespace PatternMatch;
|
|||||||
|
|
||||||
|
|
||||||
/// AddOne - Add one to a ConstantInt.
|
/// AddOne - Add one to a ConstantInt.
|
||||||
static Constant *AddOne(Constant *C) {
|
static Constant *AddOne(ConstantInt *C) {
|
||||||
return ConstantExpr::getAdd(C, ConstantInt::get(C->getType(), 1));
|
return ConstantInt::get(C->getContext(), C->getValue() + 1);
|
||||||
}
|
}
|
||||||
/// SubOne - Subtract one from a ConstantInt.
|
/// SubOne - Subtract one from a ConstantInt.
|
||||||
static Constant *SubOne(ConstantInt *C) {
|
static Constant *SubOne(ConstantInt *C) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user