[clang] [llvm] [BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 23 21:00:07 PDT 2024
================
@@ -35,6 +35,15 @@ static const char *BTFKindStr[] = {
#include "llvm/DebugInfo/BTF/BTF.def"
};
+static const DIType *tryRemoveAtomicType(const DIType *Ty) {
----------------
yonghong-song wrote:
Yes. It is necessary. completeType intends to find the *next* type id. For example, 'volatile atomic int', we want to find the target type id of 'volatile ...', we get the base type of 'volatile' and then through hash table to get the id.
But we want to skip atomic if it is there. That is why we need to call tryRemoveAtomicType.
https://github.com/llvm/llvm-project/pull/107343
More information about the cfe-commits
mailing list