mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-26 21:20:29 +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:
parent
be3e310d5e
commit
448b73a95c
@ -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