mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-21 03:32:29 +00:00
Emit a more sensible error message if no subclasses of Target are defined.
Patch contributed by Vladimir Prus. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14010 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a7afa37f3c
commit
bebdb204d2
utils/TableGen
@ -72,6 +72,8 @@ std::ostream &operator<<(std::ostream &OS, MVT::ValueType T) {
|
||||
///
|
||||
CodeGenTarget::CodeGenTarget() : PointerType(MVT::Other) {
|
||||
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!");
|
||||
TargetRec = Targets[0];
|
||||
|
@ -72,6 +72,8 @@ std::ostream &operator<<(std::ostream &OS, MVT::ValueType T) {
|
||||
///
|
||||
CodeGenTarget::CodeGenTarget() : PointerType(MVT::Other) {
|
||||
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!");
|
||||
TargetRec = Targets[0];
|
||||
|
Loading…
x
Reference in New Issue
Block a user