diff options
author | Hans Wennborg <hans@hanshq.net> | 2017-08-24 16:21:49 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2017-08-24 16:21:49 +0000 |
commit | 7926226534f7c61807c48f53af1ac8d2f6c6c1ca (patch) | |
tree | 6f79016f0587676310fc442ab6572874c1906e05 /test/CodeGenCXX/debug-info-inlined.cpp | |
parent | f19054656eb4fd4fcee1af3389f10337217dce75 (diff) |
Merging r311601:
------------------------------------------------------------------------
r311601 | adrian | 2017-08-23 14:24:12 -0700 (Wed, 23 Aug 2017) | 5 lines
Fix a bug in CGDebugInfo::EmitInlineFunctionStart causing DILocations to be
parented in function declarations.
Fixes PR33997.
https://bugs.llvm.org/show_bug.cgi?id=33997
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_50@311671 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/debug-info-inlined.cpp')
-rw-r--r-- | test/CodeGenCXX/debug-info-inlined.cpp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/test/CodeGenCXX/debug-info-inlined.cpp b/test/CodeGenCXX/debug-info-inlined.cpp new file mode 100644 index 0000000000..9969ef79ca --- /dev/null +++ b/test/CodeGenCXX/debug-info-inlined.cpp @@ -0,0 +1,45 @@ +// RUN: %clang_cc1 -emit-llvm -triple i686-pc-windows-msvc19.0.24213 -gcodeview -debug-info-kind=limited -std=c++14 %s -o - | FileCheck %s +// PR33997. +struct already_AddRefed { + ~already_AddRefed(); +}; +struct RefPtr { + operator int *(); +}; +struct ServoCssRulesStrong { + already_AddRefed Consume(); +}; +struct GroupRule { + GroupRule(already_AddRefed); +}; +class ConditionRule : GroupRule { + using GroupRule::GroupRule; +}; +class CSSMediaRule : ConditionRule { + using ConditionRule::ConditionRule; +}; +class CSSMozDocumentRule : ConditionRule { + using ConditionRule::ConditionRule; +}; +class ServoDocumentRule : CSSMozDocumentRule { + ServoDocumentRule(RefPtr); +}; +class ServoMediaRule : CSSMediaRule { + ServoMediaRule(RefPtr); +}; +ServoCssRulesStrong Servo_MediaRule_GetRules(int *); +ServoCssRulesStrong Servo_DocumentRule_GetRules(int *); +ServoDocumentRule::ServoDocumentRule(RefPtr aRawRule) + : CSSMozDocumentRule(Servo_DocumentRule_GetRules(aRawRule).Consume()) {} + +ServoMediaRule::ServoMediaRule(RefPtr aRawRule) + : CSSMediaRule(Servo_MediaRule_GetRules(aRawRule).Consume()) {} + +// CHECK: define{{.*}}ServoMediaRule +// CHECK-NOT: {{ ret }} +// CHECK: store %class.ConditionRule* % +// CHECK-SAME: %class.ConditionRule** % +// CHECK-SAME: !dbg ![[INL:[0-9]+]] + +// CHECK: ![[INL]] = !DILocation(line: 16, scope: ![[SP:[0-9]+]], inlinedAt: +// CHECK: ![[SP]] = distinct !DISubprogram(name: "GroupRule", {{.*}}isDefinition: true |