Commit a6e4400b authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Remove the unused ir/adt/iterator.[ch].

parent c908d078
......@@ -261,7 +261,6 @@ EXTRA_DIST = \
adt/bitset.h \
adt/compiler.h \
adt/fourcc.h \
adt/iterator.h \
adt/raw_bitset.h \
adt/util.h \
ana/absgraph.h \
......
/*
* Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
* This file may be distributed and/or modified under the terms of the
* GNU General Public License version 2 as published by the Free Software
* Foundation and appearing in the file LICENSE.GPL included in the
* packaging of this file.
*
* Licensees holding valid libFirm Professional Edition licenses may use
* this file in accordance with the libFirm Commercial License.
* Agreement provided with the Software.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/
/**
* @file
* @brief iterators
* @author Sebastian Hack
*/
#include "config.h"
#include <string.h>
#include "pset.h"
#include "list.h"
#include "iterator.h"
static void *it_pset_start(void *collection)
{
return pset_first((pset*) collection);
}
static void *it_pset_next(void *collection, void *curr)
{
(void) curr;
return pset_next((pset*) collection);
}
static void it_pset_finish(void *collection, void *curr)
{
(void) collection;
(void) curr;
}
static const iterator_t iterator_pset = {
ITERATOR_MAGIC,
it_pset_start,
it_pset_next,
it_pset_finish
};
const iterator_t *pset_iterator = &iterator_pset;
static void *it_list_next(void *coll, void *it)
{
struct list_head *head = (list_head*) coll;
struct list_head *curr = (list_head*) it;
return curr->next != head ? curr->next : NULL;
}
static void *it_list_start(void *coll)
{
return it_list_next(coll, coll);
}
static void it_list_finish(void *coll, void *curr)
{
(void) coll;
(void) curr;
}
static const iterator_t iterator_list = {
ITERATOR_MAGIC,
it_list_start,
it_list_next,
it_list_finish
};
const iterator_t *list_iterator = &iterator_list;
/*
* Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
* This file may be distributed and/or modified under the terms of the
* GNU General Public License version 2 as published by the Free Software
* Foundation and appearing in the file LICENSE.GPL included in the
* packaging of this file.
*
* Licensees holding valid libFirm Professional Edition licenses may use
* this file in accordance with the libFirm Commercial License.
* Agreement provided with the Software.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/
/**
* @file
* @brief Iterators for the several collection types used in firm.
* Useful for formatted and unified dumping of collections of objects.
* @author Sebastian Hack
* @date 29.11.2004
*/
#ifndef FIRM_ADT_ITERATOR_H
#define FIRM_ADT_ITERATOR_H
#include "fourcc.h"
#include "../begin.h"
/**
* The iterator magic word.
*/
#define ITERATOR_MAGIC FOURCC('I', 'T', 'E', 'R')
/**
* Check, if some memory object appears to be an iterator.
* @param ptr Some memory.
* @return 1, if that memory area appears to be an iterator, 0 if not.
*/
#define is_iterator(ptr) (((const iterator_t *) (ptr))->magic == ITERATOR_MAGIC)
typedef struct iterator_t {
unsigned magic;
void *(*start)(void *collection);
void *(*next)(void *collection, void *curr);
void (*finish)(void *collection, void *curr);
} iterator_t;
/**
* An iterator implementation for linked lists.
*/
extern const iterator_t *list_iterator;
/**
* An iterator implementation for psets.
*/
extern const iterator_t *pset_iterator;
#include "../end.h"
#endif
......@@ -32,7 +32,6 @@
#include "list.h"
#include "bitset.h"
#include "raw_bitset.h"
#include "iterator.h"
#include "bipartite.h"
#include "hungarian.h"
......
......@@ -32,7 +32,6 @@
#include "pset.h"
#include "list.h"
#include "bitset.h"
#include "iterator.h"
#include "lc_opts.h"
#include "lc_opts_enum.h"
......
......@@ -36,7 +36,6 @@
#include "obst.h"
#include "list.h"
#include "iterator.h"
#include "iredges_t.h"
#include "irgwalk.h"
......
......@@ -42,7 +42,6 @@
#include "irprintf.h"
#include "obst.h"
#include "pset.h"
#include "iterator.h"
#include "bitset.h"
#include "dbginfo_t.h"
#include "irargs_t.h"
......
......@@ -7487,10 +7487,6 @@
RelativePath="..\include\libfirm\adt\impl.h"
>
</File>
<File
RelativePath="..\include\libfirm\adt\iterator.h"
>
</File>
<File
RelativePath="..\include\libfirm\adt\list.h"
>
......
......@@ -10,7 +10,6 @@ ir\adt\eset.h adt
ir\adt\hashptr.h adt
ir\adt\array.h adt
ir\adt\pdeq.h adt
ir\adt\iterator.h adt
ir\adt\align.h adt
ir\adt\fourcc.h adt
ir\adt\util.h adt
......
......@@ -2559,10 +2559,6 @@ SOURCE=..\include\libfirm\adt\impl.h
# End Source File
# Begin Source File
SOURCE=..\include\libfirm\adt\iterator.h
# End Source File
# Begin Source File
SOURCE=..\include\libfirm\adt\list.h
# End Source File
# Begin Source File
......
......@@ -537,7 +537,6 @@
<ClInclude Include="$(FirmRoot)\include\libfirm\adt\hashptr.h"/>
<ClInclude Include="$(FirmRoot)\include\libfirm\adt\hungarian.h"/>
<ClInclude Include="$(FirmRoot)\include\libfirm\adt\hashset.h"/>
<ClInclude Include="$(FirmRoot)\include\libfirm\adt\iterator.h"/>
<ClInclude Include="$(FirmRoot)\include\libfirm\adt\list.h"/>
<ClInclude Include="$(FirmRoot)\include\libfirm\adt\obstack.h"/>
<ClInclude Include="$(FirmRoot)\include\libfirm\adt\pdeq.h"/>
......
......@@ -1380,9 +1380,6 @@
<ClInclude Include="$(FirmRoot)\include\libfirm\adt\hungarian.h">
<Filter>include\libfirm\adt</Filter>
</ClInclude>
<ClInclude Include="$(FirmRoot)\include\libfirm\adt\iterator.h">
<Filter>include\libfirm\adt</Filter>
</ClInclude>
<ClInclude Include="$(FirmRoot)\include\libfirm\adt\list.h">
<Filter>include\libfirm\adt</Filter>
</ClInclude>
......@@ -3198,9 +3195,6 @@
<ClInclude Include="$(FirmRoot)\include\libfirm\adt\hashset.h">
<Filter>include\libfirm\adt</Filter>
</ClInclude>
<ClInclude Include="$(FirmRoot)\include\libfirm\adt\iterator.h">
<Filter>include\libfirm\adt</Filter>
</ClInclude>
<ClInclude Include="$(FirmRoot)\include\libfirm\adt\list.h">
<Filter>include\libfirm\adt</Filter>
</ClInclude>
......@@ -4890,9 +4884,6 @@
<ClInclude Include="$(FirmRoot)\include\libfirm\adt\hashset.h">
<Filter>include\libfirm\adt</Filter>
</ClInclude>
<ClInclude Include="$(FirmRoot)\include\libfirm\adt\iterator.h">
<Filter>include\libfirm\adt</Filter>
</ClInclude>
<ClInclude Include="$(FirmRoot)\include\libfirm\adt\list.h">
<Filter>include\libfirm\adt</Filter>
</ClInclude>
......@@ -6573,9 +6564,6 @@
<ClInclude Include="$(FirmRoot)\include\libfirm\adt\hashset.h">
<Filter>include\libfirm\adt</Filter>
</ClInclude>
<ClInclude Include="$(FirmRoot)\include\libfirm\adt\iterator.h">
<Filter>include\libfirm\adt</Filter>
</ClInclude>
<ClInclude Include="$(FirmRoot)\include\libfirm\adt\list.h">
<Filter>include\libfirm\adt</Filter>
</ClInclude>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment