diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-05-07 19:51:44 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-05-07 19:51:44 -0400 |
| commit | 5774b48ceb7cdca7fbf3dd19fff4a0e42228473f (patch) | |
| tree | 6ef19e7bdac14683594f473b406c339253b97d48 | |
| parent | e485af94d404792f7f695fcbc7ee8f9fb986291b (diff) | |
| download | zig-5774b48ceb7cdca7fbf3dd19fff4a0e42228473f.tar.gz zig-5774b48ceb7cdca7fbf3dd19fff4a0e42228473f.zip | |
rename c_long_double to c_longdouble
to be consistent with other c primitive type names
| -rw-r--r-- | doc/langref.md | 2 | ||||
| -rw-r--r-- | src/all_types.hpp | 2 | ||||
| -rw-r--r-- | src/codegen.cpp | 6 | ||||
| -rw-r--r-- | src/parseh.cpp | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/doc/langref.md b/doc/langref.md index a83aecf822..cc4f5001d3 100644 --- a/doc/langref.md +++ b/doc/langref.md @@ -204,7 +204,7 @@ c_long long for ABI compatibility with C c_ulong unsigned long for ABI compatibility with C c_longlong long long for ABI compatibility with C c_ulonglong unsigned long long for ABI compatibility with C -c_long_double long double for ABI compatibility with C +c_longdouble long double for ABI compatibility with C c_void void for ABI compatibility with C f32 float 32-bit floating point diff --git a/src/all_types.hpp b/src/all_types.hpp index 152b29faf1..9277fa2c67 100644 --- a/src/all_types.hpp +++ b/src/all_types.hpp @@ -1360,7 +1360,7 @@ struct CodeGen { TypeTableEntry *entry_bool; TypeTableEntry *entry_int[2][4]; // [signed,unsigned][8,16,32,64] TypeTableEntry *entry_c_int[CIntTypeCount]; - TypeTableEntry *entry_c_long_double; + TypeTableEntry *entry_c_longdouble; TypeTableEntry *entry_c_void; TypeTableEntry *entry_u8; TypeTableEntry *entry_u16; diff --git a/src/codegen.cpp b/src/codegen.cpp index 49dec3589e..3da7fb186b 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -4250,14 +4250,14 @@ static void define_builtin_types(CodeGen *g) { { TypeTableEntry *entry = new_type_table_entry(TypeTableEntryIdFloat); entry->type_ref = LLVMX86FP80Type(); - buf_init_from_str(&entry->name, "c_long_double"); + buf_init_from_str(&entry->name, "c_longdouble"); entry->data.floating.bit_count = 80; uint64_t debug_size_in_bits = 8*LLVMStoreSizeOfType(g->target_data_ref, entry->type_ref); entry->di_type = ZigLLVMCreateDebugBasicType(g->dbuilder, buf_ptr(&entry->name), debug_size_in_bits, ZigLLVMEncoding_DW_ATE_float()); - g->builtin_types.entry_c_long_double = entry; + g->builtin_types.entry_c_longdouble = entry; g->primitive_type_table.put(&entry->name, entry); } { @@ -4902,7 +4902,7 @@ static void get_c_type(CodeGen *g, TypeTableEntry *type_entry, Buf *out_buf) { return; } } - if (type_entry == g->builtin_types.entry_c_long_double) { + if (type_entry == g->builtin_types.entry_c_longdouble) { buf_init_from_str(out_buf, "long double"); return; } diff --git a/src/parseh.cpp b/src/parseh.cpp index 8780e0424d..f7248a8089 100644 --- a/src/parseh.cpp +++ b/src/parseh.cpp @@ -275,7 +275,7 @@ static TypeTableEntry *resolve_type_with_table(Context *c, const Type *ty, const case BuiltinType::Double: return c->codegen->builtin_types.entry_f64; case BuiltinType::LongDouble: - return c->codegen->builtin_types.entry_c_long_double; + return c->codegen->builtin_types.entry_c_longdouble; case BuiltinType::WChar_U: case BuiltinType::Char16: case BuiltinType::Char32: |
