[TableGen] Use DefInit::getAsString instead of getDef()->getName(). NFC
authorCraig Topper <craig.topper@gmail.com>
Thu, 28 May 2015 06:38:32 +0000 (06:38 +0000)
committerCraig Topper <craig.topper@gmail.com>
Thu, 28 May 2015 06:38:32 +0000 (06:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238399 91177308-0d34-0410-b5e6-96231b3b80d8

lib/TableGen/Record.cpp

index 9f71e13..3089a13 100644 (file)
@@ -722,7 +722,7 @@ Init *UnOpInit::Fold(Record *CurRec, MultiClass *CurMultiClass) const {
         return LHSs;
 
       if (DefInit *LHSd = dyn_cast<DefInit>(LHS))
-        return StringInit::get(LHSd->getDef()->getName());
+        return StringInit::get(LHSd->getAsString());
 
       if (IntInit *LHSi = dyn_cast<IntInit>(LHS))
         return StringInit::get(LHSi->getAsString());