[PATCH] D44189: [RISCV] Verify the input value of -march=

2018-03-28 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328690: [PATCH] [RISCV] Verify the input value of -march= (authored by shiva, committed by ). Changed prior to commit: https://reviews.llvm.org/D44189?vs=139256=140049#toc Repository: rC Clang

[PATCH] D44189: [RISCV] Verify the input value of -march=

2018-03-27 Thread Ana Pazos via Phabricator via cfe-commits
apazos added inline comments. Comment at: lib/Driver/ToolChains/Arch/RISCV.cpp:51 + break; +case 'g': + // g = imafd One more question - how about non-standard extensions (vendor/custom) prefixed with X? Shouldn't we add the logic to process

[PATCH] D44189: [RISCV] Verify the input value of -march=

2018-03-22 Thread Alex Bradbury via Phabricator via cfe-commits
asb accepted this revision. asb added a comment. This revision is now accepted and ready to land. Thanks for this Kito. A tiny formatting nit, but otherwise this looks good to me. Comment at: lib/Driver/ToolChains/Arch/RISCV.cpp:70 + while (StdExtsItr != StdExts.end() &&

[PATCH] D44189: [RISCV] Verify the input value of -march=

2018-03-21 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng marked 4 inline comments as done. kito-cheng added a comment. Hi Alex: Thanks for your input, check for repeated letter was missed in my last patch :) Comment at: lib/Driver/ToolChains/Arch/RISCV.cpp:34 + +// The canonical order specified in ISA manual. +

[PATCH] D44189: [RISCV] Verify the input value of -march=

2018-03-21 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng updated this revision to Diff 139256. kito-cheng added a comment. Update revision according Alex's review. Changes: - Add testcase for uppercase of -march string. - Add testcase for repeated letter in -march. - Add more comment. - Add several TODO item for diagnostic message

[PATCH] D44189: [RISCV] Verify the input value of -march=

2018-03-14 Thread Alex Bradbury via Phabricator via cfe-commits
asb added a comment. Thanks for submitting this Kito. I've added some minor in-line comments. It might also be worth adding a couple of extra cases to the tests: - Repeated letters in the ISA string (e.g. rv32immafd) - Upper case letters in the ISA string. We currently reject these (as does

[PATCH] D44189: [RISCV] Verify the input value of -march=

2018-03-11 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng updated this revision to Diff 137970. kito-cheng added a comment. Add test cases for the correct inputs. https://reviews.llvm.org/D44189 Files: lib/Driver/ToolChains/Arch/RISCV.cpp test/Driver/riscv-arch.c Index: test/Driver/riscv-arch.c

[PATCH] D44189: [RISCV] Verify the input value of -march=

2018-03-08 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng updated this revision to Diff 137687. kito-cheng added a comment. This version only update variable name which changed in last version by accident. https://reviews.llvm.org/D44189 Files: lib/Driver/ToolChains/Arch/RISCV.cpp test/Driver/riscv-arch.c Index:

[PATCH] D44189: [RISCV] Verify the input value of -march=

2018-03-07 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng marked 2 inline comments as done. kito-cheng added inline comments. Comment at: lib/Driver/ToolChains/Arch/RISCV.cpp:48 + break; +default: + // First letter should be 'i' or 'g'. apazos wrote: > In the switch cases move default to first

[PATCH] D44189: [RISCV] Verify the input value of -march=

2018-03-07 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng updated this revision to Diff 137547. Repository: rC Clang https://reviews.llvm.org/D44189 Files: lib/Driver/ToolChains/Arch/RISCV.cpp test/Driver/riscv-arch.c Index: test/Driver/riscv-arch.c === --- /dev/null +++

[PATCH] D44189: [RISCV] Verify the input value of -march=

2018-03-07 Thread Ana Pazos via Phabricator via cfe-commits
apazos added inline comments. Comment at: lib/Driver/ToolChains/Arch/RISCV.cpp:48 + break; +default: + // First letter should be 'i' or 'g'. In the switch cases move default to first position. Comment at:

[PATCH] D44189: [RISCV] Verify the input value of -march=

2018-03-06 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng created this revision. kito-cheng added reviewers: asb, apazos. Herald added subscribers: cfe-commits, shiva0217, niosHD, sabuasal, jordy.potman.lists, simoncook, johnrusso, rbar. This patch doing more check and verify the -march= string and will issue and error if it's a invalid