unindent massive blocks, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85457 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2009-10-29 00:28:30 +00:00
parent f58898fd41
commit 77488ccc63

View File

@ -35,12 +35,15 @@ Value *llvm::MapValue(const Value *V, ValueMapTy &VM) {
if (isa<GlobalValue>(V) || isa<InlineAsm>(V) || isa<MetadataBase>(V))
return VMSlot = const_cast<Value*>(V);
if (Constant *C = const_cast<Constant*>(dyn_cast<Constant>(V))) {
Constant *C = const_cast<Constant*>(dyn_cast<Constant>(V));
if (C == 0) return 0;
if (isa<ConstantInt>(C) || isa<ConstantFP>(C) ||
isa<ConstantPointerNull>(C) || isa<ConstantAggregateZero>(C) ||
isa<UndefValue>(C) || isa<MDString>(C))
return VMSlot = C; // Primitive constants map directly
else if (ConstantArray *CA = dyn_cast<ConstantArray>(C)) {
if (ConstantArray *CA = dyn_cast<ConstantArray>(C)) {
for (User::op_iterator b = CA->op_begin(), i = b, e = CA->op_end();
i != e; ++i) {
Value *MV = MapValue(*i, VM);
@ -59,8 +62,9 @@ Value *llvm::MapValue(const Value *V, ValueMapTy &VM) {
}
}
return VM[V] = C;
}
} else if (ConstantStruct *CS = dyn_cast<ConstantStruct>(C)) {
if (ConstantStruct *CS = dyn_cast<ConstantStruct>(C)) {
for (User::op_iterator b = CS->op_begin(), i = b, e = CS->op_end();
i != e; ++i) {
Value *MV = MapValue(*i, VM);
@ -79,13 +83,16 @@ Value *llvm::MapValue(const Value *V, ValueMapTy &VM) {
}
}
return VM[V] = C;
}
} else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
std::vector<Constant*> Ops;
for (User::op_iterator i = CE->op_begin(), e = CE->op_end(); i != e; ++i)
Ops.push_back(cast<Constant>(MapValue(*i, VM)));
return VM[V] = CE->getWithOperands(Ops);
} else if (ConstantVector *CP = dyn_cast<ConstantVector>(C)) {
}
if (ConstantVector *CP = dyn_cast<ConstantVector>(C)) {
for (User::op_iterator b = CP->op_begin(), i = b, e = CP->op_end();
i != e; ++i) {
Value *MV = MapValue(*i, VM);
@ -105,10 +112,9 @@ Value *llvm::MapValue(const Value *V, ValueMapTy &VM) {
}
return VM[V] = C;
} else {
}
llvm_unreachable("Unknown type of constant!");
}
}
return 0;
}