[PATCH] D119026: [HIP] Emit amdgpu_code_object_version module flag
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 7 11:39:06 PST 2022
tra accepted this revision.
tra added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1166
CmdArgs.insert(CmdArgs.begin() + 1, "-mllvm");
+ // -cc1as does not need -mcode-object-version option.
+ if (!IsCC1As)
----------------
`does not need -mcode-object-version` --> `does not accept...`
================
Comment at: clang/test/CodeGenCUDA/amdgpu-code-object-version.cu:24-25
+
+// RUN: not %clang -cc1as -triple amdgcn-amd-amdhsa \
+// RUN: -mcode-object-version=5 -o - %s 2>&1 | FileCheck -check-prefix=AS %s
+
----------------
I think what we want to check is that if top-level driver decides t invoke cc1as, that we do not pass the `-mcode-object-version` to it.
That `cc1as` would not accept that option is not very interesting -- it's a CC1-only option, after all.
I guess that makes my test idea also not very interesting -- if we were to accidentally pass that option, it would cause an error.
OK, let's just update the comment above cc1as check and remove this test.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119026/new/
https://reviews.llvm.org/D119026
More information about the cfe-commits
mailing list