[all-commits] [llvm/llvm-project] bbb367: [SPIRV] Fix compilation error 'use of parameter fr...
Vyacheslav Levytskyy via All-commits
all-commits at lists.llvm.org
Wed Sep 25 02:06:39 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bbb3679ad8e5a6d2ed6432a8171465eadf9f73f8
https://github.com/llvm/llvm-project/commit/bbb3679ad8e5a6d2ed6432a8171465eadf9f73f8
Author: Vyacheslav Levytskyy <vyacheslav.levytskyy at intel.com>
Date: 2024-09-25 (Wed, 25 Sep 2024)
Changed paths:
M llvm/lib/Target/SPIRV/SPIRVUtils.cpp
Log Message:
-----------
[SPIRV] Fix compilation error 'use of parameter from containing function' when building PR #106429 with gcc (#109924)
It appears that PR https://github.com/llvm/llvm-project/pull/106429
introduced an issue for builds with SPIRV Backend target when building
with gcc, e.g.:
```
/llvm-project/llvm/lib/Target/SPIRV/SPIRVUtils.cpp:263:36: error: use of parameter from containing function
263 | llvm::SyncScope::ID SubGroup = Ctx.getOrInsertSyncScopeID("subgroup");
| ^~~
/llvm-project/llvm/lib/Target/SPIRV/SPIRVUtils.cpp:256:46: note: ‘llvm::LLVMContext& Ctx’ declared here
256 | SPIRV::Scope::Scope getMemScope(LLVMContext &Ctx, SyncScope::ID Id) {
```
This PR fixes this by removing struct and using static const variables
instead.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list