diff options
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 2d2c280..4782e80 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1249,8 +1249,12 @@ llvm::DIType *CGDebugInfo::CreatePointerLikeType(llvm::dwarf::Tag Tag, CGM.getTarget().getDWARFAddressSpace( CGM.getTypes().getTargetAddressSpace(PointeeTy)); + const BTFTagAttributedType *BTFAttrTy; + if (auto *Atomic = PointeeTy->getAs<AtomicType>()) + BTFAttrTy = dyn_cast<BTFTagAttributedType>(Atomic->getValueType()); + else + BTFAttrTy = dyn_cast<BTFTagAttributedType>(PointeeTy); SmallVector<llvm::Metadata *, 4> Annots; - auto *BTFAttrTy = dyn_cast<BTFTagAttributedType>(PointeeTy); while (BTFAttrTy) { StringRef Tag = BTFAttrTy->getAttr()->getBTFTypeTag(); if (!Tag.empty()) { |
