Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24015 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Laskey 2005-10-26 17:49:21 +00:00
parent 641b64aa4b
commit 6c302fc075

View File

@ -182,12 +182,7 @@ void SubtargetEmitter::ParseFeaturesFunction(std::ostream &OS) {
// SubtargetEmitter::run - Main subtarget enumeration emitter.
//
void SubtargetEmitter::run(std::ostream &OS) {
std::vector<Record*> Targets = Records.getAllDerivedDefinitions("Target");
if (Targets.size() == 0)
throw std::string("ERROR: No 'Target' subclasses defined!");
if (Targets.size() != 1)
throw std::string("ERROR: Multiple subclasses of Target defined!");
Target = Targets[0]->getName();
Target = CodeGenTarget().getName();
EmitSourceFileHeader("Subtarget Enumeration Source Fragment", OS);