Don't use anonymous types declared in an anonymous union.

They are a non-standard extension (probably in C1X, IIRC), but clang is unhappy
with them when -Wnested-anon-types is enabled, which seems to be implied by
-pedantic.

With this change and the previous fix for clang, we are now -Werror clean, even
on clang 3.3.

R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/14850016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14659 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b65b6d73
......@@ -3841,25 +3841,29 @@ struct JitCodeEvent {
// CODE_ADD_LINE_POS_INFO and CODE_END_LINE_INFO_RECORDING events.
void* user_data;
struct name_t {
// Name of the object associated with the code, note that the string is not
// zero-terminated.
const char* str;
// Number of chars in str.
size_t len;
};
struct line_info_t {
// PC offset
size_t offset;
// Code postion
size_t pos;
// The position type.
PositionType position_type;
};
union {
// Only valid for CODE_ADDED.
struct {
// Name of the object associated with the code, note that the string is
// not zero-terminated.
const char* str;
// Number of chars in str.
size_t len;
} name;
struct name_t name;
// Only valid for CODE_ADD_LINE_POS_INFO
struct {
// PC offset
size_t offset;
// Code postion
size_t pos;
// The position type.
PositionType position_type;
} line_info;
struct line_info_t line_info;
// New location of instructions. Only valid for CODE_MOVED.
void* new_code_start;
......
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