mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 02:25:19 +00:00
Fix bug: TableGen/IntBitInit.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7526 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -93,6 +93,10 @@ Init *BitsRecTy::convertValue(TypedInit *VI) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Init *IntRecTy::convertValue(BitInit *BI) {
|
||||
return new IntInit(BI->getValue());
|
||||
}
|
||||
|
||||
Init *IntRecTy::convertValue(BitsInit *BI) {
|
||||
int Result = 0;
|
||||
for (unsigned i = 0, e = BI->getNumBits(); i != e; ++i)
|
||||
@@ -105,7 +109,7 @@ Init *IntRecTy::convertValue(BitsInit *BI) {
|
||||
}
|
||||
|
||||
Init *IntRecTy::convertValue(TypedInit *TI) {
|
||||
if (dynamic_cast<IntRecTy*>(TI->getType()))
|
||||
if (TI->getType()->typeIsConvertibleTo(this))
|
||||
return TI; // Accept variable if already of the right type!
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user