mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-12 15:51:35 +00:00
Fix bug: TableGen/IntBitInit.td
llvm-svn: 7526
This commit is contained in:
parent
e16a7ab1d7
commit
57808fae3c
@ -93,6 +93,10 @@ Init *BitsRecTy::convertValue(TypedInit *VI) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Init *IntRecTy::convertValue(BitInit *BI) {
|
||||||
|
return new IntInit(BI->getValue());
|
||||||
|
}
|
||||||
|
|
||||||
Init *IntRecTy::convertValue(BitsInit *BI) {
|
Init *IntRecTy::convertValue(BitsInit *BI) {
|
||||||
int Result = 0;
|
int Result = 0;
|
||||||
for (unsigned i = 0, e = BI->getNumBits(); i != e; ++i)
|
for (unsigned i = 0, e = BI->getNumBits(); i != e; ++i)
|
||||||
@ -105,7 +109,7 @@ Init *IntRecTy::convertValue(BitsInit *BI) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Init *IntRecTy::convertValue(TypedInit *TI) {
|
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 TI; // Accept variable if already of the right type!
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -145,6 +145,7 @@ public:
|
|||||||
struct IntRecTy : public RecTy {
|
struct IntRecTy : public RecTy {
|
||||||
Init *convertValue(UnsetInit *UI) { return (Init*)UI; }
|
Init *convertValue(UnsetInit *UI) { return (Init*)UI; }
|
||||||
Init *convertValue(IntInit *II) { return (Init*)II; }
|
Init *convertValue(IntInit *II) { return (Init*)II; }
|
||||||
|
Init *convertValue(BitInit *BI);
|
||||||
Init *convertValue(BitsInit *BI);
|
Init *convertValue(BitsInit *BI);
|
||||||
Init *convertValue(TypedInit *TI);
|
Init *convertValue(TypedInit *TI);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user