diff options
Diffstat (limited to 'utils/TableGen/SubtargetEmitter.cpp')
-rw-r--r-- | utils/TableGen/SubtargetEmitter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/utils/TableGen/SubtargetEmitter.cpp b/utils/TableGen/SubtargetEmitter.cpp index a6cee216da..091cbc679b 100644 --- a/utils/TableGen/SubtargetEmitter.cpp +++ b/utils/TableGen/SubtargetEmitter.cpp @@ -473,10 +473,11 @@ void SubtargetEmitter::ParseFeaturesFunction(std::ostream &OS) { Record *R = Features[i]; std::string Instance = R->getName(); std::string Name = R->getValueAsString("Name"); - std::string Type = R->getValueAsString("Type"); + std::string Value = R->getValueAsString("Value"); std::string Attribute = R->getValueAsString("Attribute"); - - OS << " " << Attribute << " = (Bits & " << Instance << ") != 0;\n"; + + OS << " if ((Bits & " << Instance << ") != 0) " + << Attribute << " = " << Value << ";\n"; } if (HasItineraries) { |