http://llvm.org/bugs/show_bug.cgi?id=20961
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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
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;
}
generates:
------------- 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 = ?;
}
Analysis:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140908/235018.html
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
class/multiclass.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs