mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-11 06:38:20 +00:00
Implement String Cast from Integer
Allow casts from integer to string. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149273 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -738,6 +738,11 @@ Init *UnOpInit::Fold(Record *CurRec, MultiClass *CurMultiClass) const {
|
|||||||
if (LHSd) {
|
if (LHSd) {
|
||||||
return StringInit::get(LHSd->getDef()->getName());
|
return StringInit::get(LHSd->getDef()->getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IntInit *LHSi = dynamic_cast<IntInit*>(LHS);
|
||||||
|
if (LHSi) {
|
||||||
|
return StringInit::get(LHSi->getAsString());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
StringInit *LHSs = dynamic_cast<StringInit*>(LHS);
|
StringInit *LHSs = dynamic_cast<StringInit*>(LHS);
|
||||||
if (LHSs) {
|
if (LHSs) {
|
||||||
|
Reference in New Issue
Block a user