Implement String Cast from Integer

Allow casts from integer to string.

llvm-svn: 149273
This commit is contained in:
David Greene 2012-01-30 20:47:04 +00:00
parent a5bfdedb9f
commit 22e9ce48e0

View File

@ -738,6 +738,11 @@ Init *UnOpInit::Fold(Record *CurRec, MultiClass *CurMultiClass) const {
if (LHSd) {
return StringInit::get(LHSd->getDef()->getName());
}
IntInit *LHSi = dynamic_cast<IntInit*>(LHS);
if (LHSi) {
return StringInit::get(LHSi->getAsString());
}
} else {
StringInit *LHSs = dynamic_cast<StringInit*>(LHS);
if (LHSs) {