[PATCH] D63105: Add --print-supported-cpus flag for clang.
Yi Kong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 12 13:36:37 PDT 2019
kongyi added inline comments.
================
Comment at: clang/docs/ClangCommandLineReference.rst:613
+
+.. option:: -mcpu=<cpu>
+
----------------
L615 should be after L609.
================
Comment at: clang/test/Driver/print-supported-cpus.c:3
+
+// RUN: %clang --target=x86_64-unknown-linux-gnu \
+// RUN: --print-supported-cpus 2>&1 \
----------------
Add test for a different architecture to verify that `--target` works.
================
Comment at: clang/tools/driver/cc1_main.cpp:185
+ llvm::TargetMachine *TheTargetMachine =
+ TheTarget->createTargetMachine(TargetStr, "", "+cpuHelp", Options, RM);
+ delete TheTargetMachine;
----------------
RM seems to be unused. Can you use `None`?
================
Comment at: clang/tools/driver/cc1_main.cpp:186
+ TheTarget->createTargetMachine(TargetStr, "", "+cpuHelp", Options, RM);
+ delete TheTargetMachine;
+ return 0;
----------------
Use unique_ptr instead.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63105/new/
https://reviews.llvm.org/D63105
More information about the llvm-commits
mailing list