[llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y
Chris Lattner
lattner at cs.uiuc.edu
Tue Feb 22 15:14:14 PST 2005
Changes in directory llvm/lib/AsmParser:
llvmAsmParser.y updated: 1.211 -> 1.212
---
Log message:
C++ is not a functional programming language.
---
Diffs of the changes: (+7 -5)
llvmAsmParser.y | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
Index: llvm/lib/AsmParser/llvmAsmParser.y
diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.211 llvm/lib/AsmParser/llvmAsmParser.y:1.212
--- llvm/lib/AsmParser/llvmAsmParser.y:1.211 Mon Jan 31 19:47:42 2005
+++ llvm/lib/AsmParser/llvmAsmParser.y Tue Feb 22 17:13:58 2005
@@ -1024,8 +1024,9 @@
}
| 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 @@
}
| '{' 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;
}
More information about the llvm-commits
mailing list