mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Don't crash if there is no Inst class in the tablegen file!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7402 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -394,10 +394,12 @@ int main(int argc, char **argv) {
|
||||
RemoveFileOnSignal(OutputFilename);
|
||||
}
|
||||
|
||||
int ErrorCode = 0;
|
||||
|
||||
switch (Action) {
|
||||
case Parse: ParseMachineCode(); break;
|
||||
case GenEmitter:
|
||||
CodeEmitterGen(Records).createEmitter(*Out);
|
||||
ErrorCode = CodeEmitterGen(Records).createEmitter(*Out);
|
||||
break;
|
||||
case PrintRecords:
|
||||
*Out << Records; // No argument, dump all contents
|
||||
@@ -421,5 +423,5 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
if (Out != &std::cout) delete Out;
|
||||
return 0;
|
||||
return ErrorCode;
|
||||
}
|
||||
|
Reference in New Issue
Block a user