From 19c95507443ebd4f1cee80917d540c8bd27f8fe1 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 27 Jan 2006 08:09:42 +0000 Subject: Subtarget feature can now set any variable to any value git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25678 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/SubtargetEmitter.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'utils/TableGen/SubtargetEmitter.cpp') 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) { -- cgit v1.2.3