diff options
| author | Awanish Pandey <Awanish.Pandey@amd.com> | 2020-01-13 12:38:00 +0530 |
|---|---|---|
| committer | Sourabh Singh Tomar <SourabhSingh.Tomar@amd.com> | 2020-01-13 12:40:18 +0530 |
| commit | 6d6a4590c5d4c7fc7445d72fe685f966b0a8cafb (patch) | |
| tree | 909c2d737b58df2583ff771fe20b9cc8fbcc2d67 /clang/test | |
| parent | c958639098a8702b831952b1a1a677ae19190a55 (diff) | |
| download | bcm5719-llvm-6d6a4590c5d4c7fc7445d72fe685f966b0a8cafb.tar.gz bcm5719-llvm-6d6a4590c5d4c7fc7445d72fe685f966b0a8cafb.zip | |
[DWARF5][clang]: Added support for DebugInfo generation for auto return type for C++ member functions.
Summary:
This patch will provide support for auto return type for the C++ member
functions.
This patch includes clang side implementation of this feature.
Patch by: Awanish Pandey <Awanish.Pandey@amd.com>
Reviewers: dblaikie, aprantl, shafik, alok, SouraVX, jini.susan.george
Reviewed by: dblaikie
Differential Revision: https://reviews.llvm.org/D70524
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CodeGenCXX/debug-info-auto-return.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-auto-return.cpp b/clang/test/CodeGenCXX/debug-info-auto-return.cpp new file mode 100644 index 00000000000..8b4c5cb3ad9 --- /dev/null +++ b/clang/test/CodeGenCXX/debug-info-auto-return.cpp @@ -0,0 +1,22 @@ +// Test for debug info for C++11 auto return member functions +// RUN: %clang_cc1 -dwarf-version=5 -emit-llvm -triple x86_64-linux-gnu %s -o - \ +// RUN: -O0 -disable-llvm-passes \ +// RUN: -debug-info-kind=standalone \ +// RUN: | FileCheck %s + +// CHECK: !DISubprogram(name: "findMax",{{.*}}, type: ![[FUN_TYPE:[0-9]+]],{{.*}} + +// CHECK: ![[FUN_TYPE]] = !DISubroutineType(types: ![[TYPE_NODE:[0-9]+]]) +// CHECK-NEXT: ![[TYPE_NODE]] = !{![[DOUBLE_TYPE:[0-9]+]], {{.*}} +// CHECK-NEXT: ![[DOUBLE_TYPE]] = !DIBasicType(name: "double", {{.*}}) + +// CHECK: !DISubroutineType(types: ![[TYPE_DECL_NODE:[0-9]+]]) +// CHECK-NEXT: ![[TYPE_DECL_NODE]] = !{![[AUTO_TYPE:[0-9]+]], {{.*}} +// CHECK-NEXT: ![[AUTO_TYPE]] = !DIBasicType(tag: DW_TAG_unspecified_type, name: "auto") +struct myClass { + auto findMax(); +}; + +auto myClass::findMax() { + return 0.0; +} |

