OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr33627.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do compile } */
2
 
3
typedef unsigned int UT_uint32;
4
typedef UT_uint32 PT_DocPosition;
5
typedef UT_uint32 PT_BlockOffset;
6
typedef enum _PTStruxType { PTX_Block } PTStruxType;
7
typedef UT_uint32 PL_ListenerId;
8
typedef const void * PL_StruxFmtHandle;
9
class PX_ChangeRecord;
10
class pf_Frag {
11
  public:
12
   typedef enum _PFType { PFT_Object } PFType;
13
   inline PFType getType(void) const { }
14
   inline pf_Frag * getNext(void) const { }
15
   PT_DocPosition getPos(void) const { }
16
};
17
class pf_Fragments {
18
  public:
19
   pf_Frag * getFirst() const;
20
};
21
class pt_PieceTable {
22
   bool getStruxOfTypeFromPosition(PL_ListenerId listenerId, PT_DocPosition docPos, PTStruxType pts, PL_StruxFmtHandle * psfh) const;
23
   bool _tellAndMaybeAddListener(PL_ListenerId listenerId, bool bAdd);
24
   pf_Fragments m_fragments;
25
};
26
class pf_Frag_Object : public pf_Frag
27
{
28
  public:
29
   virtual bool createSpecialChangeRecord(PX_ChangeRecord ** ppcr, PT_DocPosition dpos, PT_BlockOffset blockOffset) const;
30
};
31
bool pt_PieceTable::_tellAndMaybeAddListener(PL_ListenerId listenerId, bool bAdd)
32
{
33
  PL_StruxFmtHandle sfh = 0;
34
  PT_DocPosition sum = 0;
35
  UT_uint32 blockOffset = 0;
36
  for (pf_Frag * pf = m_fragments.getFirst(); (pf); pf=pf->getNext())
37
  {
38
      pf_Frag_Object * pfo = static_cast (pf);
39
      PX_ChangeRecord * pcr = __null;
40
      bool bStatus1 = false;
41
      if(sfh != __null)     {
42
       bStatus1 = pfo->createSpecialChangeRecord(&pcr,sum,blockOffset);
43
       if (!(bStatus1))
44
         return (false);
45
      }
46
      else
47
      {
48
       PT_DocPosition pos = pf->getPos();
49
       getStruxOfTypeFromPosition(listenerId,pos,PTX_Block,&sfh);
50
       bStatus1 = pfo->createSpecialChangeRecord(&pcr,pos,blockOffset);
51
       if (!(bStatus1))
52
         return (false);
53
      }
54
      if (!(bStatus1))
55
        return (false);
56
  }
57
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.