diff options
author | Chris Lattner <sabre@nondot.org> | 2001-06-27 23:41:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-06-27 23:41:11 +0000 |
commit | 4cee8d8ffbdf355428c46dad34cbc4d2c70b6015 (patch) | |
tree | 31549814da047e6a706166197544f9e62449851c /llvm/lib/VMCore/ConstantPool.cpp | |
parent | 347389dae8f22da4ab7f4de8540bf121d30c1c1a (diff) | |
download | bcm5719-llvm-4cee8d8ffbdf355428c46dad34cbc4d2c70b6015.tar.gz bcm5719-llvm-4cee8d8ffbdf355428c46dad34cbc4d2c70b6015.zip |
Miscellaneous cleanups:
* Convert post to pre-increment for for loops
* Use generic programming more
* Use new Value::cast* instructions
* Use new Module, Method, & BasicBlock forwarding methods
* Use new facilities in STLExtras.h
* Use new Instruction::isPHINode() method
llvm-svn: 96
Diffstat (limited to 'llvm/lib/VMCore/ConstantPool.cpp')
-rw-r--r-- | llvm/lib/VMCore/ConstantPool.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/VMCore/ConstantPool.cpp b/llvm/lib/VMCore/ConstantPool.cpp index d624c8dad0c..77ed50ae26d 100644 --- a/llvm/lib/VMCore/ConstantPool.cpp +++ b/llvm/lib/VMCore/ConstantPool.cpp @@ -85,9 +85,8 @@ void ConstantPool::delete_all() { void ConstantPool::dropAllReferences() { for (unsigned i = 0; i < Planes.size(); i++) - for (PlaneType::iterator I = Planes[i]->begin(); - I != Planes[i]->end(); I++) - (*I)->dropAllReferences(); + for_each(Planes[i]->begin(), Planes[i]->end(), + mem_fun(&ConstPoolVal::dropAllReferences)); } struct EqualsConstant { @@ -280,10 +279,7 @@ ConstPoolStruct::ConstPoolStruct(const ConstPoolStruct &CPS) // getStrValue implementations string ConstPoolBool::getStrValue() const { - if (Val) - return "true"; - else - return "false"; + return Val ? "true" : "false"; } string ConstPoolSInt::getStrValue() const { |