]> granicus.if.org Git - clang/commitdiff
Add a debug info testcase for the trvial_abi attribute.
authorAdrian Prantl <aprantl@apple.com>
Thu, 8 Mar 2018 23:11:46 +0000 (23:11 +0000)
committerAdrian Prantl <aprantl@apple.com>
Thu, 8 Mar 2018 23:11:46 +0000 (23:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327078 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGenCXX/debug-info-composite-cc.cpp

index 2f0911612196857f7b34c7621ffef924427b8abb..d4d4046105e143f0fd3706cde84f8936b1807c9f 100644 (file)
@@ -38,3 +38,13 @@ struct Complex {
   Complex(Complex &Copy) : i(Copy.i) {};
   int i;
 } complex;
+
+// This type is manually marked as trivial_abi.
+// CHECK-DAG: !DICompositeType({{.*}}, name: "Marked",{{.*}}flags: DIFlagTypePassByValue
+struct __attribute__((trivial_abi)) Marked {
+  int *p;
+  Marked();
+  ~Marked();
+  Marked(const Marked &) noexcept;
+  Marked &operator=(const Marked &);
+} marked;