[clang] [llvm] [RFC][BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 9 18:22:02 PDT 2024
================
@@ -91,6 +91,12 @@ void BTFTypeDerived::completeType(BTFDebug &BDebug) {
// The base type for PTR/CONST/VOLATILE could be void.
const DIType *ResolvedType = DTy->getBaseType();
+ if (ResolvedType) {
+ const auto *DerivedTy = dyn_cast<DIDerivedType>(ResolvedType);
+ if (DerivedTy && DerivedTy->getTag() == dwarf::DW_TAG_atomic_type)
----------------
eddyz87 wrote:
Nit: since this is done in two places, maybe extract it as a utility?
https://github.com/llvm/llvm-project/pull/107343
More information about the cfe-commits
mailing list