1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

C++ is not a functional programming language.

llvm-svn: 20274
This commit is contained in:
Chris Lattner 2005-02-22 23:13:58 +00:00
parent d870103306
commit d888514f0c

View File

@ -1024,8 +1024,9 @@ UpRTypes : '\\' EUINT64VAL { // Type UpReference
}
| UpRTypesV '(' ArgTypeListI ')' { // Function derived type?
std::vector<const Type*> Params;
mapto($3->begin(), $3->end(), std::back_inserter(Params),
std::mem_fun_ref(&PATypeHolder::get));
for (std::list<llvm::PATypeHolder>::iterator I = $3->begin(),
E = $3->end(); I != E; ++I)
Params.push_back(*I);
bool isVarArg = Params.size() && Params.back() == Type::VoidTy;
if (isVarArg) Params.pop_back();
@ -1050,9 +1051,10 @@ UpRTypes : '\\' EUINT64VAL { // Type UpReference
}
| '{' TypeListI '}' { // Structure type?
std::vector<const Type*> Elements;
mapto($2->begin(), $2->end(), std::back_inserter(Elements),
std::mem_fun_ref(&PATypeHolder::get));
for (std::list<llvm::PATypeHolder>::iterator I = $2->begin(),
E = $2->end(); I != E; ++I)
Elements.push_back(*I);
$$ = new PATypeHolder(HandleUpRefs(StructType::get(Elements)));
delete $2;
}