mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-17 00:27:31 +00:00
Implement String Cast from Integer
Allow casts from integer to string. llvm-svn: 149273
This commit is contained in:
parent
a5bfdedb9f
commit
22e9ce48e0
@ -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
Block a user