<div>
                    Hello guys,
                </div><div><br></div><div>So, I'm stucked in a problem involving a Function and a derived class. Well, I was refactoring part of my pass code, and created two classes in this process that are interesting here: class A and class B. Class B inherits from class A; on the other hand, class A has some pure virtual methods (already implemented in class B), and a Module, that holds only one auxiliary function (a working copy of the function being processed by the pass with some adjustments).</div><div><br></div><div>Ok, the derived class, B, calls a method inherited from A (let's say, initialize()), that uses the implementation in B of the virtual methods in A. So far, so good. This initialize method basically builds my module and initializes its function. Here comes the strange part: if I dump the function in the very end of initialize(), I can access without problems the basic blocks on it. But once I'd returned to the B method that called initialize(), if I dump the function (which is a protected attribute in A, btw), I get a message like that:</div><div><br></div><div><span>Assertion failed: (!empty() && "Called front() on empty list!"), function front, file /Developer/llvm/include/llvm/ADT/ilist.h, line 388.</span></div><div><span>[...]</span></div><div><br></div>
                <div><div>Is there some tricky way to do this that I'm not seeing?</div><div><br></div><div>Thanks in advance,</div><div><br></div><div>-- </div><div>Cristianno Martins</div><div>PhD Student of Computer Science</div><div>University of Campinas</div><div>cmartins@ic.unicamp.br</div></div>