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:
parent
d870103306
commit
d888514f0c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user