Opts.td 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. include "llvm/Option/OptParser.td"
  2. // All the switches can be preceded by either '/' or '-'.
  3. // These options seem to be important for the tool
  4. // and should be implemented.
  5. class S<string name, string help> :
  6. Separate<["/", "-"], name>, HelpText<help>;
  7. class JS<string name, string help> :
  8. JoinedOrSeparate<["/", "-"], name>, HelpText<help>;
  9. class F<string name, string help> : Flag<["/", "-"], name>, HelpText<help>;
  10. class F_nodoc<string name> : Flag<["/", "-"], name>;
  11. class S_nodoc<string name> : Separate<["/", "-"], name>;
  12. def fileout : JS<"FO", "Change the output file location.">;
  13. def define : JS<"D", "Define a symbol for the C preprocessor.">;
  14. def undef : JS<"U", "Undefine a symbol for the C preprocessor.">;
  15. def lang_id : JS<"L", "Set the default language identifier.">;
  16. def lang_name : S<"LN", "Set the default language name.">;
  17. def includepath : JS<"I", "Add an include path.">;
  18. def noinclude : F<"X", "Ignore 'include' variable.">;
  19. def add_null : F<"N", "Null-terminate all strings in the string table.">;
  20. def dupid_nowarn : F<"Y", "Suppress warnings on duplicate resource IDs.">;
  21. def verbose : F<"V", "Be verbose.">;
  22. def help : F<"?", "Display this help and exit.">;
  23. def h : F<"H", "Display this help and exit.">, Alias<help>;
  24. def codepage : JS<"C", "Set the codepage used for input strings.">;
  25. // llvm-rc specific options:
  26. def dry_run : F<"dry-run", "Don't compile the input; only try to parse it.">;
  27. def no_preprocess : F<"no-preprocess", "Don't try to preprocess the input file.">;
  28. // Print (but do not run) the commands to run for preprocessing
  29. def _HASH_HASH_HASH : F_nodoc<"###">;
  30. // Unused switches (at least for now). These will stay unimplemented
  31. // in an early stage of development and can be ignored. However, we need to
  32. // parse them in order to preserve the compatibility with the original tool.
  33. def nologo : F_nodoc<"NOLOGO">;
  34. def r : F_nodoc<"R">;
  35. def sl : F_nodoc<"SL">;
  36. // (Codepages support.)
  37. def w : F_nodoc<"W">;
  38. // (Support of MUI and similar.)
  39. def fm : S_nodoc<"FM">;
  40. def q : S_nodoc<"Q">;
  41. def g : F_nodoc<"G">;
  42. def gn : F_nodoc<"GN">;
  43. def g1 : F_nodoc<"G1">;
  44. def g2 : F_nodoc<"G2">;