Commit a3ff67c3 authored by Dave Cheney's avatar Dave Cheney Committed by Russ Cox

godefs: add enum/const testdata

Also, add golden output data for linux/arm.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5256041
parent 55751a38
......@@ -39,3 +39,14 @@ struct T5 {
typedef struct T5 T5;
typedef struct T4 $T4;
typedef T5 $T5;
// Test constants and enumerations are printed correctly. clang/2.9 with
// -O2 and above causes Bprint to print %#llx values incorrectly.
enum {
$sizeofPtr = sizeof(void*),
$sizeofShort = sizeof(short),
$sizeofInt = sizeof(int),
$sizeofLong = sizeof(long),
$sizeofLongLong = sizeof(long long),
};
......@@ -5,6 +5,13 @@
package test
// Constants
const (
sizeofPtr = 0x4;
sizeofShort = 0x2;
sizeofInt = 0x4;
sizeofLong = 0x4;
sizeofLongLong = 0x8;
)
// Types
......
......@@ -5,6 +5,13 @@
package test
// Constants
const (
sizeofPtr = 0x8;
sizeofShort = 0x2;
sizeofInt = 0x4;
sizeofLong = 0x8;
sizeofLongLong = 0x8;
)
// Types
......
// ./godefs -g test testdata.c
// MACHINE GENERATED - DO NOT EDIT.
package test
// Constants
const (
sizeofPtr = 0x4;
sizeofShort = 0x2;
sizeofInt = 0x4;
sizeofLong = 0x4;
sizeofLongLong = 0x8;
)
// Types
type T2 struct {
A uint8;
Pad_godefs_0 [3]byte;
B uint32;
C uint32;
D uint16;
Pad_godefs_1 [2]byte;
}
type T3 struct {
A uint8;
Pad_godefs_0 [3]byte;
Pad0 int32;
}
type T4 struct {
}
type T5 struct {
A *T4;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment