0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/src/zig_llvm.cpp

1658 lines
70 KiB

Ignore class-memaccess error for gcc 8 and above On Arch Linux the current default compiler is gcc 8.2.1 and this change is needed to ignore the following errors: In file included from /home/wink/local/include/llvm/ADT/STLExtras.h:21, from /home/wink/local/include/llvm/ADT/StringRef.h:13, from /home/wink/local/include/llvm/ADT/StringMap.h:17, from /home/wink/local/include/llvm/Support/Host.h:17, from /home/wink/local/include/llvm/ADT/Hashing.h:49, from /home/wink/local/include/llvm/ADT/ArrayRef.h:13, from /home/wink/local/include/llvm/ADT/APFloat.h:21, from /home/wink/local/include/clang/AST/APValue.h:18, from /home/wink/local/include/clang/AST/Decl.h:17, from /home/wink/local/include/clang/AST/ASTTypeTraits.h:20, from /home/wink/local/include/clang/AST/ASTContext.h:18, from /home/wink/local/include/clang/Frontend/ASTUnit.h:18, from /home/wink/prgs/ziglang/zig/src/translate_c.cpp:18: /home/wink/local/include/llvm/ADT/SmallVector.h: In instantiation of ‘void llvm::SmallVectorTemplateBase<T, true>::push_back(const T&) [with T = std::pair<void*, long unsigned int>]’: /home/wink/local/include/llvm/Support/Allocator.h:249:33: required from ‘void* llvm::BumpPtrAllocatorImpl<AllocatorT, SlabSize, SizeThreshold>::Allocate(size_t, size_t) [with AllocatorT = llvm::MallocAllocator; long unsigned int SlabSize = 4096; long unsigned int SizeThreshold = 4096; size_t = long unsigned int]’ /home/wink/local/include/clang/AST/ASTContext.h:659:42: required from here /home/wink/local/include/llvm/ADT/SmallVector.h:313:11: error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct std::pair<void*, long unsigned int>’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess] memcpy(this->end(), &Elt, sizeof(T)); ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/8.2.1/utility:70, from /home/wink/local/include/llvm/Support/type_traits.h:19, from /home/wink/local/include/llvm/Support/Casting.h:19, from /home/wink/local/include/clang/Basic/LLVM.h:22, from /home/wink/local/include/clang/AST/APValue.h:17, from /home/wink/local/include/clang/AST/Decl.h:17, from /home/wink/local/include/clang/AST/ASTTypeTraits.h:20, from /home/wink/local/include/clang/AST/ASTContext.h:18, from /home/wink/local/include/clang/Frontend/ASTUnit.h:18, from /home/wink/prgs/ziglang/zig/src/translate_c.cpp:18: /usr/include/c++/8.2.1/bits/stl_pair.h:198:12: note: ‘struct std::pair<void*, long unsigned int>’ declared here struct pair ^~~~
2018-09-24 09:33:45 -07:00
Ignore class-memaccess error for gcc 8 and above On Arch Linux the current default compiler is gcc 8.2.1 and this change is needed to ignore the following errors: In file included from /home/wink/local/include/llvm/ADT/STLExtras.h:21, from /home/wink/local/include/llvm/ADT/StringRef.h:13, from /home/wink/local/include/llvm/ADT/StringMap.h:17, from /home/wink/local/include/llvm/Support/Host.h:17, from /home/wink/local/include/llvm/ADT/Hashing.h:49, from /home/wink/local/include/llvm/ADT/ArrayRef.h:13, from /home/wink/local/include/llvm/ADT/APFloat.h:21, from /home/wink/local/include/clang/AST/APValue.h:18, from /home/wink/local/include/clang/AST/Decl.h:17, from /home/wink/local/include/clang/AST/ASTTypeTraits.h:20, from /home/wink/local/include/clang/AST/ASTContext.h:18, from /home/wink/local/include/clang/Frontend/ASTUnit.h:18, from /home/wink/prgs/ziglang/zig/src/translate_c.cpp:18: /home/wink/local/include/llvm/ADT/SmallVector.h: In instantiation of ‘void llvm::SmallVectorTemplateBase<T, true>::push_back(const T&) [with T = std::pair<void*, long unsigned int>]’: /home/wink/local/include/llvm/Support/Allocator.h:249:33: required from ‘void* llvm::BumpPtrAllocatorImpl<AllocatorT, SlabSize, SizeThreshold>::Allocate(size_t, size_t) [with AllocatorT = llvm::MallocAllocator; long unsigned int SlabSize = 4096; long unsigned int SizeThreshold = 4096; size_t = long unsigned int]’ /home/wink/local/include/clang/AST/ASTContext.h:659:42: required from here /home/wink/local/include/llvm/ADT/SmallVector.h:313:11: error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct std::pair<void*, long unsigned int>’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess] memcpy(this->end(), &Elt, sizeof(T)); ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/8.2.1/utility:70, from /home/wink/local/include/llvm/Support/type_traits.h:19, from /home/wink/local/include/llvm/Support/Casting.h:19, from /home/wink/local/include/clang/Basic/LLVM.h:22, from /home/wink/local/include/clang/AST/APValue.h:17, from /home/wink/local/include/clang/AST/Decl.h:17, from /home/wink/local/include/clang/AST/ASTTypeTraits.h:20, from /home/wink/local/include/clang/AST/ASTContext.h:18, from /home/wink/local/include/clang/Frontend/ASTUnit.h:18, from /home/wink/prgs/ziglang/zig/src/translate_c.cpp:18: /usr/include/c++/8.2.1/bits/stl_pair.h:198:12: note: ‘struct std::pair<void*, long unsigned int>’ declared here struct pair ^~~~
2018-09-24 09:33:45 -07:00
2023-01-03 12:05:09 +01:00
2018-04-04 18:27:52 -04:00
2017-10-23 21:43:18 -04:00
2017-03-13 11:54:56 -04:00
Ignore class-memaccess error for gcc 8 and above On Arch Linux the current default compiler is gcc 8.2.1 and this change is needed to ignore the following errors: In file included from /home/wink/local/include/llvm/ADT/STLExtras.h:21, from /home/wink/local/include/llvm/ADT/StringRef.h:13, from /home/wink/local/include/llvm/ADT/StringMap.h:17, from /home/wink/local/include/llvm/Support/Host.h:17, from /home/wink/local/include/llvm/ADT/Hashing.h:49, from /home/wink/local/include/llvm/ADT/ArrayRef.h:13, from /home/wink/local/include/llvm/ADT/APFloat.h:21, from /home/wink/local/include/clang/AST/APValue.h:18, from /home/wink/local/include/clang/AST/Decl.h:17, from /home/wink/local/include/clang/AST/ASTTypeTraits.h:20, from /home/wink/local/include/clang/AST/ASTContext.h:18, from /home/wink/local/include/clang/Frontend/ASTUnit.h:18, from /home/wink/prgs/ziglang/zig/src/translate_c.cpp:18: /home/wink/local/include/llvm/ADT/SmallVector.h: In instantiation of ‘void llvm::SmallVectorTemplateBase<T, true>::push_back(const T&) [with T = std::pair<void*, long unsigned int>]’: /home/wink/local/include/llvm/Support/Allocator.h:249:33: required from ‘void* llvm::BumpPtrAllocatorImpl<AllocatorT, SlabSize, SizeThreshold>::Allocate(size_t, size_t) [with AllocatorT = llvm::MallocAllocator; long unsigned int SlabSize = 4096; long unsigned int SizeThreshold = 4096; size_t = long unsigned int]’ /home/wink/local/include/clang/AST/ASTContext.h:659:42: required from here /home/wink/local/include/llvm/ADT/SmallVector.h:313:11: error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct std::pair<void*, long unsigned int>’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess] memcpy(this->end(), &Elt, sizeof(T)); ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/8.2.1/utility:70, from /home/wink/local/include/llvm/Support/type_traits.h:19, from /home/wink/local/include/llvm/Support/Casting.h:19, from /home/wink/local/include/clang/Basic/LLVM.h:22, from /home/wink/local/include/clang/AST/APValue.h:17, from /home/wink/local/include/clang/AST/Decl.h:17, from /home/wink/local/include/clang/AST/ASTTypeTraits.h:20, from /home/wink/local/include/clang/AST/ASTContext.h:18, from /home/wink/local/include/clang/Frontend/ASTUnit.h:18, from /home/wink/prgs/ziglang/zig/src/translate_c.cpp:18: /usr/include/c++/8.2.1/bits/stl_pair.h:198:12: note: ‘struct std::pair<void*, long unsigned int>’ declared here struct pair ^~~~
2018-09-24 09:33:45 -07:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2015-11-24 15:01:37 -07:00
2015-11-24 15:01:37 -07:00
2019-10-02 13:05:10 -04:00
2021-08-16 01:11:10 -07:00
2021-08-16 01:11:10 -07:00
2021-08-16 01:11:10 -07:00
2021-08-16 01:11:10 -07:00
2023-01-03 12:05:09 +01:00
2023-01-03 12:05:09 +01:00
2019-12-31 17:54:12 +01:00
2019-12-05 16:55:32 -05:00
2019-12-05 16:55:32 -05:00
2019-12-05 16:55:32 -05:00
2019-12-05 16:55:32 -05:00
2019-12-05 16:55:32 -05:00
2021-07-25 05:34:11 +02:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2017-03-10 02:29:01 -05:00
2017-03-10 02:29:01 -05:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2015-12-07 20:07:46 -07:00
2015-12-07 20:07:46 -07:00
2016-09-09 12:25:16 -04:00
2015-12-07 20:07:46 -07:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2015-12-16 17:11:35 -07:00
2019-06-04 09:05:33 +02:00
2015-12-16 17:11:35 -07:00
2016-09-09 12:25:16 -04:00
2015-12-16 17:11:35 -07:00
2016-09-09 12:25:16 -04:00
2019-06-04 09:05:33 +02:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2017-09-01 10:27:04 -07:00
2016-09-09 12:25:16 -04:00
2019-06-04 09:05:33 +02:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2015-12-16 17:11:35 -07:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2015-12-16 17:11:35 -07:00
2016-09-09 12:25:16 -04:00
2015-12-16 17:11:35 -07:00
2016-09-09 12:25:16 -04:00
2015-12-16 17:11:35 -07:00
2016-09-09 12:25:16 -04:00
2015-12-16 17:11:35 -07:00
2016-09-09 12:25:16 -04:00
2019-06-04 09:05:33 +02:00
2016-01-18 16:42:45 -07:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-02-04 14:02:37 -07:00
2016-09-09 12:25:16 -04:00
2016-02-04 14:02:37 -07:00
2016-09-09 12:25:16 -04:00
2016-02-04 14:02:37 -07:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-03-08 18:56:14 -07:00
2016-09-09 12:25:16 -04:00
2015-12-16 17:11:35 -07:00
2018-01-31 01:51:15 -05:00
2017-11-14 23:53:53 -05:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-03-08 18:56:14 -07:00
2019-06-04 09:05:33 +02:00
2016-09-09 12:25:16 -04:00
2016-03-08 18:56:14 -07:00
2016-09-09 12:25:16 -04:00
2017-03-10 02:29:01 -05:00
2016-09-09 12:25:16 -04:00
2016-03-08 18:56:14 -07:00
2016-03-08 18:56:14 -07:00
2019-06-04 09:05:33 +02:00
2016-09-09 12:25:16 -04:00
2015-12-07 20:57:45 -07:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2015-12-16 17:11:35 -07:00
2016-09-09 12:25:16 -04:00
2015-12-16 17:11:35 -07:00
2016-09-09 12:25:16 -04:00
2017-03-10 02:29:01 -05:00
2017-03-10 02:29:01 -05:00
2016-09-09 12:25:16 -04:00
2016-09-04 18:30:40 -07:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2018-12-23 18:22:30 -05:00
2016-01-18 16:42:45 -07:00
2016-01-18 16:42:45 -07:00
2018-12-23 17:36:41 -05:00
2019-06-04 09:05:33 +02:00
2018-12-23 18:22:30 -05:00
2016-03-08 18:56:14 -07:00
2018-12-23 17:36:41 -05:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2015-12-07 23:09:48 -07:00
2015-12-07 23:09:48 -07:00
2016-09-09 12:25:16 -04:00
2015-12-07 23:09:48 -07:00
2016-09-09 12:25:16 -04:00
2016-09-09 12:25:16 -04:00
2015-12-07 23:09:48 -07:00
2015-12-07 23:09:48 -07:00
2016-09-09 12:25:16 -04:00
2017-11-29 19:11:34 -05:00
2016-03-08 18:56:14 -07:00
2022-07-01 19:19:13 -07:00
2022-07-01 19:19:13 -07:00
2017-03-10 02:29:01 -05:00
2017-03-10 02:29:01 -05:00
2020-10-12 14:29:43 +05:30
2017-03-10 02:29:01 -05:00
2020-02-21 11:47:34 -05:00
2018-09-30 01:34:38 -05:00
2019-07-25 00:03:06 -04:00
2019-07-25 22:24:01 -04:00
2019-07-25 00:03:06 -04:00
2022-07-01 19:19:13 -07:00
2019-07-25 22:24:01 -04:00
2019-12-31 17:54:12 +01:00
2017-03-13 11:54:56 -04:00
2017-03-13 11:54:56 -04:00
2019-12-17 00:24:23 +02:00
2021-08-16 01:11:10 -07:00
2021-02-25 21:14:40 -05:00
2019-07-16 22:23:48 -04:00
2021-02-25 21:14:40 -05:00
2021-08-16 01:11:10 -07:00
2019-07-16 22:23:48 -04:00
2019-12-31 17:54:12 +01:00