[PATCH] D26145: DebugInfo: support for DW_TAG_atomic_type
Victor Leschuk via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 31 12:19:41 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL285625: DebugInfo: support for DW_TAG_atomic_type (authored by vleschuk).
Changed prior to commit:
https://reviews.llvm.org/D26145?vs=76441&id=76458#toc
Repository:
rL LLVM
https://reviews.llvm.org/D26145
Files:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
cfe/trunk/test/CodeGen/debug-info-atomic.c
Index: cfe/trunk/test/CodeGen/debug-info-atomic.c
===================================================================
--- cfe/trunk/test/CodeGen/debug-info-atomic.c
+++ cfe/trunk/test/CodeGen/debug-info-atomic.c
@@ -0,0 +1,7 @@
+// RUN: %clang -g -c -std=c11 -S -emit-llvm -o - %s | FileCheck %s
+
+// CHECK: !DIGlobalVariable(name: "i"{{.*}}type: !5, isLocal: false, isDefinition: true)
+// CHECK: !5 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !6)
+// CHECK: !6 = !DIDerivedType(tag: DW_TAG_atomic_type, baseType: !7)
+// CHECK: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+_Atomic const int i;
Index: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
===================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
@@ -2287,9 +2287,8 @@
}
llvm::DIType *CGDebugInfo::CreateType(const AtomicType *Ty, llvm::DIFile *U) {
- // Ignore the atomic wrapping
- // FIXME: What is the correct representation?
- return getOrCreateType(Ty->getValueType(), U);
+ auto *FromTy = getOrCreateType(Ty->getValueType(), U);
+ return DBuilder.createQualifiedType(llvm::dwarf::DW_TAG_atomic_type, FromTy);
}
llvm::DIType* CGDebugInfo::CreateType(const PipeType *Ty,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26145.76458.patch
Type: text/x-patch
Size: 1265 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161031/b024a94c/attachment.bin>
More information about the cfe-commits
mailing list