Merge pull request #4716 from Unity-Technologies/eglib-msvc-targets
[mono.git] / mcs / ilasm / Driver.cs
index d57ba98fe11296e3355f103672593852ce5c8d82..af7120dce5878fc481227faf290c186e52eb5662 100644 (file)
@@ -33,7 +33,7 @@ namespace Mono.ILASM {
                         DriverMain driver = new DriverMain (args);
                         if (!driver.Run ())
                                 return 1;
-                        Console.WriteLine ("Operation completed successfully");
+                        Report.Message ("Operation completed successfully");
                         return 0;
                 }
 
@@ -44,8 +44,8 @@ namespace Mono.ILASM {
                         private Target target = Target.Exe;
                         private string target_string = "exe";
                         private bool show_tokens = false;
-                        private bool show_method_def = false;
-                        private bool show_method_ref = false;
+//                        private bool show_method_def = false;
+//                        private bool show_method_ref = false;
                         private bool show_parser = false;
                         private bool scan_only = false;
                        private bool debugging_info = false;
@@ -68,8 +68,10 @@ namespace Mono.ILASM {
                                         output_file = CreateOutputFilename ();
                                 try {
                                         codegen = new CodeGen (output_file, target == Target.Dll, debugging_info);
-                                        foreach (string file_path in il_file_list)
+                                        foreach (string file_path in il_file_list) {
+                                                Report.FilePath = file_path;
                                                 ProcessFile (file_path);
+                                        }
                                         if (scan_only)
                                                 return true;
 
@@ -102,7 +104,7 @@ namespace Mono.ILASM {
 
                                 try {
                                        if (sn != null) {
-                                               Console.WriteLine ("Signing assembly with the specified strongname keypair");
+                                               Report.Message ("Signing assembly with the specified strongname keypair");
                                                return Sign (output_file);
                                        }
                                 } catch {
@@ -180,14 +182,14 @@ namespace Mono.ILASM {
                                         else
                                                 parser.yyparse (new ScannerAdapter (scanner),  null);
                                 } catch (ILTokenizingException ilte) {
-                                        Report.Error (file_path, ilte.Location, "syntax error at token '" + ilte.Token + "'");
+                                        Report.Error (ilte.Location, "syntax error at token '" + ilte.Token + "'");
                                 } catch (Mono.ILASM.yyParser.yyException ye) {
-                                        Report.Error (file_path, scanner.Reader.Location, ye.Message);
+                                        Report.Error (scanner.Reader.Location, ye.Message);
                                 } catch (ILAsmException ie) {
                                         ie.FilePath = file_path;
                                         ie.Location = scanner.Reader.Location;
                                         throw;
-                                } catch (Exception e){
+                                } catch (Exception){
                                         Console.Write ("{0} ({1}, {2}): ",file_path, scanner.Reader.Location.line, scanner.Reader.Location.column);
                                         throw;
                                 } finally {
@@ -247,8 +249,6 @@ namespace Mono.ILASM {
                                                 break;
                                         case "debug":
                                         case "deb":
-                                               if (str[0] != '-')
-                                                       break;
                                                debugging_info = true;
                                                break;
                                         // Stubs to stay commandline compatible with MS 
@@ -277,10 +277,10 @@ namespace Mono.ILASM {
                                                 show_tokens = true;
                                                 break;
                                         case "show_method_def":
-                                                show_method_def = true;
+//                                                show_method_def = true;
                                                 break;
                                         case "show_method_ref":
-                                                show_method_ref = true;
+//                                                show_method_ref = true;
                                                 break;
                                         case "show_parser":
                                                 show_parser = true;