[llvm] LLVMContext: add getSyncScopeName() to lookup individual scope name (PR #109484)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 24 05:37:15 PDT 2024
================
@@ -4190,13 +4190,11 @@ NVPTX::Scope NVPTXScopes::operator[](SyncScope::ID ID) const {
"NVPTXScopes::operator[]");
auto S = Scopes.find(ID);
- if (S == Scopes.end()) {
- // TODO:
- // - Add API to LLVMContext to get the name of a single scope.
- // - Use that API here to print an error containing the name
- // of this Unknown ID.
- report_fatal_error(formatv("Could not find scope ID={}.", int(ID)));
- }
+ if (S == Scopes.end())
+ report_fatal_error(formatv("Could not find scope ID={} with name \"{}\".",
----------------
gonzalobg wrote:
noted, it seems that there are a few other places in the NVPTX backend where we could use it, so will look at that in a different PR
https://github.com/llvm/llvm-project/pull/109484
More information about the llvm-commits
mailing list