[LLVMbugs] [Bug 20961] New: Properly resolve class-instance value within a template class

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Sep 16 10:36:34 PDT 2014


            Bug ID: 20961
           Summary: Properly resolve class-instance value within a
                    template class
           Product: tools
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: TableGen
          Assignee: anemet at apple.com
          Reporter: anemet at apple.com
                CC: chisophugis at gmail.com, llvmbugs at cs.uiuc.edu,
                    tstellar at gmail.com
    Classification: Unclassified

This testcase (originally from Tom):

class A <int op1> {
  int OP1 = op1;

class B <int op2> {
  A OP2 = A<op2>;
  int OP3 = OP2.OP1;

def b : B <1>;

def z {
  int k = b.OP3;
  int z = b.OP2.OP1;


------------- Classes -----------------
class A<int A:op1 = ?> {
  int OP1 = A:op1;
  string NAME = ?;
class B<int B:op2 = ?> {
  A OP2 = anonymous_0;
  int OP3 = OP2.OP1;
  string NAME = ?;
------------- Defs -----------------
def anonymous_0 {       // A
  int OP1 = B:op2;
  string NAME = ?;
def b { // B
  A OP2 = anonymous_0;
  int OP3 = B:op2;
  string NAME = ?;
def z {
  int k = B:op2;
  int z = b.OP2.OP1;
  string NAME = ?;


As part of fixing this bug we should also consider removing the flag
ResolveFirst from Record. 

My initial idea is to have common base class for SubClassReference and
MultiClass which would contain a vector of Record representing class-instance
variables that are used within the class or the multiclass.  These would then
be instantiated first thing as part of instantiating the enclosing

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140916/cb0532b0/attachment.html>

More information about the llvm-bugs mailing list