aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorJakub Chlanda <jakub@codeplay.com>2024-06-30 07:56:07 +0200
committerGitHub <noreply@github.com>2024-06-30 07:56:07 +0200
commitab200864220b72b3bdf1fe9d001ad3d1e4d9d4b3 (patch)
tree0d11cfc89b959adcb9105e6400d16ddf59d1681b /clang/lib/Sema
parent6b737c444617fe8c11eb48f978c579cc160bfff0 (diff)
downloadllvm-ab200864220b72b3bdf1fe9d001ad3d1e4d9d4b3.zip
llvm-ab200864220b72b3bdf1fe9d001ad3d1e4d9d4b3.tar.gz
llvm-ab200864220b72b3bdf1fe9d001ad3d1e4d9d4b3.tar.bz2
[CUDA][NFC] CudaArch to OffloadArch rename (#97028)
Rename `CudaArch` to `OffloadArch` to better reflect its content and the use. Apply a similar rename to helpers handling the enum.
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index 7e6c7d7..41489789 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -5116,12 +5116,12 @@ bool Sema::CheckRegparmAttr(const ParsedAttr &AL, unsigned &numParams) {
return false;
}
-// Helper to get CudaArch.
-static CudaArch getCudaArch(const TargetInfo &TI) {
+// Helper to get OffloadArch.
+static OffloadArch getOffloadArch(const TargetInfo &TI) {
if (!TI.getTriple().isNVPTX())
- llvm_unreachable("getCudaArch is only valid for NVPTX triple");
+ llvm_unreachable("getOffloadArch is only valid for NVPTX triple");
auto &TO = TI.getTargetOpts();
- return StringToCudaArch(TO.CPU);
+ return StringToOffloadArch(TO.CPU);
}
// Checks whether an argument of launch_bounds attribute is
@@ -5181,10 +5181,10 @@ Sema::CreateLaunchBoundsAttr(const AttributeCommonInfo &CI, Expr *MaxThreads,
if (MaxBlocks) {
// '.maxclusterrank' ptx directive requires .target sm_90 or higher.
- auto SM = getCudaArch(Context.getTargetInfo());
- if (SM == CudaArch::UNKNOWN || SM < CudaArch::SM_90) {
+ auto SM = getOffloadArch(Context.getTargetInfo());
+ if (SM == OffloadArch::UNKNOWN || SM < OffloadArch::SM_90) {
Diag(MaxBlocks->getBeginLoc(), diag::warn_cuda_maxclusterrank_sm_90)
- << CudaArchToString(SM) << CI << MaxBlocks->getSourceRange();
+ << OffloadArchToString(SM) << CI << MaxBlocks->getSourceRange();
// Ignore it by setting MaxBlocks to null;
MaxBlocks = nullptr;
} else {