summaryrefslogtreecommitdiffstats
path: root/loc2c.c
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-09-18 08:17:29 +0200
committerMark Wielaard <mjw@redhat.com>2009-09-18 08:17:29 +0200
commit5ec323b5228c83b15fdae81029eddab1b745703b (patch)
treef123001e6292e7b5b471e93c0cae963452a0f803 /loc2c.c
parentbb5ba1d9bf1e83de32ea2da4975d4958e366c3da (diff)
downloadsystemtap-steved-5ec323b5228c83b15fdae81029eddab1b745703b.tar.gz
systemtap-steved-5ec323b5228c83b15fdae81029eddab1b745703b.tar.xz
systemtap-steved-5ec323b5228c83b15fdae81029eddab1b745703b.zip
PR10417 Fix declare_noncontig_union struct emitting.
* loc2c.c (declare_noncontig_union): Only open struct when loc_noncontiguous.
Diffstat (limited to 'loc2c.c')
-rw-r--r--loc2c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/loc2c.c b/loc2c.c
index c27242fa..5d6b5494 100644
--- a/loc2c.c
+++ b/loc2c.c
@@ -1407,12 +1407,12 @@ declare_noncontig_union (struct obstack *pool, int indent,
obstack_printf (pool, "%*schar bytes[%" PRIu64 "];\n",
indent * 2, "", loc->byte_size);
- obstack_printf (pool, "%*sstruct {\n", indent++ * 2, "");
-
if (loc->type == loc_noncontiguous)
{
Dwarf_Word offset = 0;
struct location *p;
+ obstack_printf (pool, "%*sstruct {\n", indent++ * 2, "");
+
for (p = loc->pieces; p != NULL; p = p->next)
{
obstack_printf (pool, "%*suint%" PRIu64 "_t p%" PRIu64 ";\n",