forked from OSchip/llvm-project
Implement String Cast from Integer
Allow casts from integer to string. llvm-svn: 149273
This commit is contained in:
parent
c9204f6bed
commit
6291f3a43c
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue