[PATCH] D59347: [DebugInfo] Combine Trivial and NonTrivial flags
Aaron Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 11 13:23:09 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL358219: [DebugInfo] Combine Trivial and NonTrivial flags (authored by asmith, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D59347?vs=194249&id=194737#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59347/new/
https://reviews.llvm.org/D59347
Files:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
cfe/trunk/test/CodeGenCXX/debug-info-composite-triviality.cpp
Index: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
===================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
@@ -3034,10 +3034,8 @@
else
Flags |= llvm::DINode::FlagTypePassByValue;
- // Record if a C++ record is trivial type.
- if (CXXRD->isTrivial())
- Flags |= llvm::DINode::FlagTrivial;
- else
+ // Record if a C++ record is non-trivial type.
+ if (!CXXRD->isTrivial())
Flags |= llvm::DINode::FlagNonTrivial;
}
Index: cfe/trunk/test/CodeGenCXX/debug-info-composite-triviality.cpp
===================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-composite-triviality.cpp
+++ cfe/trunk/test/CodeGenCXX/debug-info-composite-triviality.cpp
@@ -25,34 +25,40 @@
// Cases to test composite type's triviality
-// CHECK-DAG: !DICompositeType({{.*}}, name: "Union",{{.*}}flags: {{.*}}DIFlagTrivial
+// CHECK-DAG: {{.*}}!DIGlobalVariable(name: "Union",
+// CHECK-DAG-NEXT: {{^((?!\bDIFlagNonTrivial\b).)*$}}
union Union {
int a;
} Union;
-// CHECK-DAG: !DICompositeType({{.*}}, name: "Trivial",{{.*}}flags: {{.*}}DIFlagTrivial
+// CHECK-DAG: {{.*}}!DIGlobalVariable(name: "Trivial",
+// CHECK-DAG-NEXT: {{^((?!\bDIFlagNonTrivial\b).)*$}}
struct Trivial {
int i;
} Trivial;
-// CHECK-DAG: !DICompositeType({{.*}}, name: "TrivialA",{{.*}}flags: {{.*}}DIFlagTrivial
+// CHECK-DAG: {{.*}}!DIGlobalVariable(name: "TrivialA",
+// CHECK-DAG-NEXT: {{^((?!\bDIFlagNonTrivial\b).)*$}}
struct TrivialA {
TrivialA() = default;
} TrivialA;
-// CHECK-DAG: !DICompositeType({{.*}}, name: "TrivialB",{{.*}}flags: {{.*}}DIFlagTrivial
+// CHECK-DAG: {{.*}}!DIGlobalVariable(name: "TrivialB",
+// CHECK-DAG-NEXT: {{^((?!\bDIFlagNonTrivial\b).)*$}}
struct TrivialB {
int m;
TrivialB(int x) { m = x; }
TrivialB() = default;
} TrivialB;
-// CHECK-DAG: !DICompositeType({{.*}}, name: "TrivialC",{{.*}}flags: {{.*}}DIFlagTrivial
+// CHECK-DAG: {{.*}}!DIGlobalVariable(name: "TrivialC",
+// CHECK-DAG-NEXT: {{^((?!\bDIFlagNonTrivial\b).)*$}}
struct TrivialC {
struct Trivial x;
} TrivialC;
-// CHECK-DAG: !DICompositeType({{.*}}, name: "TrivialD",{{.*}}flags: {{.*}}DIFlagTrivial
+// CHECK-DAG: {{.*}}!DIGlobalVariable(name: "TrivialD",
+// CHECK-DAG-NEXT: {{^((?!\bDIFlagNonTrivial\b).)*$}}
struct NT {
NT() {};
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59347.194737.patch
Type: text/x-patch
Size: 2450 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190411/b10783e9/attachment.bin>
More information about the llvm-commits
mailing list