File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ std::string errors::usage() {
3838 " --ast-with-types\n "
3939 " --ast-with-concrete-types\n "
4040 " --llvm-ir\n "
41- " --obj\n " ;
41+ " --assembly\n "
42+ " --object-code\n " ;
4243}
4344
4445std::string errors::generic_error (Location location, std::string message) {
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ void check_usage(int argc, char *argv[]) {
5151 if (argv[1 ] == std::string (" run" ) && argc < 3 ) {
5252 print_usage_and_exit ();
5353 }
54- if (argv[1 ] == std::string (" emit" ) && (argc < 4 || !(argv[2 ] == std::string (" --llvm-ir" ) || argv[2 ] == std::string (" --ast" ) || argv[2 ] == std::string (" --ast-with-types" ) || argv[2 ] == std::string (" --ast-with-concrete-types" ) || argv[2 ] == std::string (" --tokens" ) || argv[2 ] == std::string (" --obj " ) || argv[2 ] == std::string (" --asm " )))) {
54+ if (argv[1 ] == std::string (" emit" ) && (argc < 4 || !(argv[2 ] == std::string (" --llvm-ir" ) || argv[2 ] == std::string (" --ast" ) || argv[2 ] == std::string (" --ast-with-types" ) || argv[2 ] == std::string (" --ast-with-concrete-types" ) || argv[2 ] == std::string (" --tokens" ) || argv[2 ] == std::string (" --object-code " ) || argv[2 ] == std::string (" --assembly " )))) {
5555 print_usage_and_exit ();
5656 }
5757};
@@ -189,14 +189,14 @@ void emit(Command command) {
189189 }
190190
191191 // Emit asm
192- if (command.options [0 ] == std::string (" --asm " )) {
192+ if (command.options [0 ] == std::string (" --assembly " )) {
193193 codegen::print_assembly (ast, program_name);
194194 ast.free ();
195195 return ;
196196 }
197197
198198 // Emit object code
199- if (command.options [0 ] == std::string (" --obj " )) {
199+ if (command.options [0 ] == std::string (" --object-code " )) {
200200 codegen::generate_object_code (ast, program_name);
201201 ast.free ();
202202 return ;
You can’t perform that action at this time.
0 commit comments