message: Issue : Adding option to choose style of code for assembly.
diff: @@ -110,6 +110,9 @@ usage(int ret) {
  printf(" [--dwarf-version={2,3,4}]\t\tGenerate source-level debug information with given DWARF version (triggers -g)\n");
  #endif
  printf(" [--emit-asm]\t\t\tGenerate assembly language file as output\n");
  + printf(" [--x86-asm-syntax=<option>]\t\tSelect style of code if generating assembly\n");
  + printf(" intel\t\t\t\tEmit Intel-style assembly\n");
  + printf(" att\t\t\t\tEmit AT&T-style assembly\n");
  printf(" [--emit-c++]\t\t\tEmit a C++ source file as output\n");
  printf(" [--emit-llvm]\t\t\tEmit LLVM bitode file as output\n");
  printf(" [--emit-obj]\t\t\tGenerate object file file as output (default)\n");
  @@ -466,7 +469,7 @@ int main(int Argc, char *Argv[]) {
  Module::OutputType ot = Module::Object;
  Module::OutputFlags flags = Module::NoFlags;
  - const char *arch = NULL, *cpu = NULL, *target = NULL;
  + const char *arch = NULL, *cpu = NULL, *target = NULL, *intelAsmSyntax = NULL;
  for (int i = 1; i < argc; ++i) {
  if (!strcmp(argv[i], "--help"))
  @@ -489,6 +492,14 @@ int main(int Argc, char *Argv[]) {
  }
  else if (!strncmp(argv[i], "--arch=", 7))
  arch = argv[i] + 7;
  + else if (!strncmp(argv[i], "--x86-asm-syntax=", 17)) {
  + intelAsmSyntax = argv[i] + 17;
  + if (!((std::string(intelAsmSyntax) == "intel") || (std::string(intelAsmSyntax) == "att"))) {
  + intelAsmSyntax = NULL;
  + fprintf(stderr, "Invalid value for --x86-asm-syntax: \"%s\" -- "
  + "only intel and att are allowed.\n", argv[i]+17);
  + }
  + }
  else if (!strncmp(argv[i], "--cpu=", 6))
  cpu = argv[i] + 6;
  else if (!strcmp(argv[i], "--fast-math")) {
  @@ -796,6 +807,17 @@ int main(int Argc, char *Argv[]) {
  "Program will be compiled and warnings/errors will "
  "be issued, but no output will be generated.");
  + if ((ot == Module::Asm) && (intelAsmSyntax != NULL)) {
  + std::vector<const char *> Args(3);
  + Args[0] = "ispc (LLVM option parsing)";
  + Args[2] = nullptr;
  + if (std::string(intelAsmSyntax) == "intel")
  + Args[1] = "--x86-asm-syntax=intel";
  + else
  + Args[1] = "--x86-asm-syntax=att";
  + llvm::cl::ParseCommandLineOptions(2, Args.data());
  + }
  +
  return Module::CompileAndOutput(file, arch, cpu, target, flags,
  ot,
  outFileName,
  