aboutsummaryrefslogtreecommitdiff
path: root/src/zig_llvm.cpp
AgeCommit message (Collapse)Author
2019-04-02more regression fixes. empty test passes againAndrew Kelley
2019-03-18workaround for Ubuntu/Debian bugAndrew Kelley
see #2076
2019-02-28Merge remote-tracking branch 'origin/master' into llvm8Andrew Kelley
2019-02-26breaking changes to the way targets work in zigAndrew Kelley
* CLI: `-target [name]` instead of `--target-*` args. This matches clang's API. * `builtin.Environ` renamed to `builtin.Abi` - likewise `builtin.environ` renamed to `builtin.abi` * stop hiding the concept of sub-arch. closes #1526 * `zig targets` only shows available targets. closes #438 * include all targets in readme, even those that don't print with `zig targets` but note they are Tier 4 * refactor target.cpp and make the naming conventions more consistent * introduce the concept of a "default C ABI" for a given OS/Arch combo. As a rule of thumb, if the system compiler is clang or gcc then the default C ABI is the gnu ABI.
2019-02-04fix vector debug info tripping LLVM assertionAndrew Kelley
2019-02-04fix vector debug info tripping LLVM assertionAndrew Kelley
2019-02-04Merge remote-tracking branch 'origin/master' into llvm8Andrew Kelley
2019-01-30introduce vector type for SIMDAndrew Kelley
See #903 * create with `@Vector(len, ElemType)` * only wrapping addition is implemented This feature is far from complete; this is only the beginning.
2019-01-24update to llvm8 trunk. all tests passingAndrew Kelley
2019-01-01Merge remote-tracking branch 'origin/master' into llvm8Andrew Kelley
2018-12-30Add DIFlagStaticMember flag to functions.alexander
Prevents LLVM from generating debug info for struct member functions with a pointer as the first parameter as though the first parameter were the implicit "this" pointer from C++.
2018-12-23llvm8: fix ZigLLVMCreateFunctionAndrew Kelley
2018-12-23llvm8: fix build errorsAndrew Kelley
2018-12-23Merge remote-tracking branch 'origin/master' into llvm8Andrew Kelley
2018-11-28work around to support debian's fork of llvm 7.0.1Andrew Kelley
it has a patch that adds an OS type, breaking the public API this commit avoids depending on the last os type enum item, but retains the safety assertion checks. closes #1788
2018-11-05update to build against llvm trunkAndrew Kelley
2018-10-09support building static librariesAndrew Kelley
closes #1493 closes #54
2018-09-30fixed native target detectionemekoi
2018-09-24Ignore class-memaccess error for gcc 8 and aboveWink Saville
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-16Merge remote-tracking branch 'origin/master' into llvm7Andrew Kelley
2018-09-11rename --enable-timing-info to -ftime-report to match clangAndrew Kelley
and have it print llvm's internal timing info
2018-07-24Merge remote-tracking branch 'origin/master' into llvm7Andrew Kelley
2018-07-16self-hosted: create tmp dir for .o files and emit .o file for fnAndrew Kelley
2018-07-03update for latest llvmAndrew Kelley
2018-06-14llvm7: find external liblldWasm and update for newest lld macho APIAndrew Kelley
2018-06-14Merge remote-tracking branch 'origin/master' into llvm7Andrew Kelley
2018-06-09support `--target-arch wasm32` (#1094)Ben Noordhuis
Add wasm32 support to the build-obj, build-exe and build-lib commands of the stage 1 compiler. Wasm64 should work transparently once it's supported in upstream LLVM. To export a function: // lib.zig - for exposition, not necessary for this example pub use @import("add.zig"); // add.zig export fn add(a: i32, b: i32) i32 { return a + b; } To import a function: // cube.zig extern fn square(x: i32) i32; export fn cube(x: i32) i32 { return x * square(x); }
2018-05-26update to latest LLVM APIAndrew Kelley
2018-04-26Merge remote-tracking branch 'origin/master' into llvm7Andrew Kelley
2018-04-18improve cmpxchgAndrew Kelley
* remove @cmpxchg, add @cmpxchgWeak and @cmpxchgStrong - See explanations in the langref. * add operand type as first parameter * return type is ?T where T is the operand type closes #461
2018-04-16Set SizeLevel to 2 in ReleaseSmall modeAlexandros Naskos
2018-04-16Added ReleaseSmall modeAlexandros Naskos
2018-04-04update to latest llvm APIAndrew Kelley
2018-03-22use the llvm API for creating memcpy and memset instructionsAndrew Kelley
2018-03-01Merge remote-tracking branch 'origin/master' into llvm6Andrew Kelley
2018-02-25add coroutine LLVM passesAndrew Kelley
2018-02-25codegen for coro_id instructionAndrew Kelley
See #727
2018-02-13Merge remote-tracking branch 'origin/master' into llvm6Andrew Kelley
2018-02-13zig_llvm.cpp uses new(std::nothrow)Andrew Kelley
This fixes a mismatched malloc/delete because we were allocating with malloc and then llvm was freeing with delete.
2018-02-11Merge remote-tracking branch 'origin/master' into llvm6Andrew Kelley
2018-01-31*WIP* error setsAndrew Kelley
2018-01-06Merge branch 'master' into llvm6Andrew Kelley
2018-01-06disable NewGVNAndrew Kelley
closes #673
2017-12-26Merge branch 'master' into llvm6Andrew Kelley
2017-12-26self-hosted: build against zig_llvm and embedded LLDAndrew Kelley
Now the self-hosted compiler re-uses the same C++ code for interfacing with LLVM as the C++ code. It also links against the same LLD library files.
2017-12-23Merge remote-tracking branch 'origin/master' into llvm6Andrew Kelley
2017-12-06add higher level arg-parsing API + misc. changesAndrew Kelley
* add @noInlineCall - see #640 This fixes a crash in --release-safe and --release-fast modes where the optimizer inlines everything into _start and clobbers the command line argument data. If we were able to verify that the user's code never reads command line args, we could leave off this "no inline" attribute. * add i29 and u29 primitive types. u29 is the type of alignment, so it makes sense to be a primitive. probably in the future we'll make any `i` or `u` followed by digits into a primitive. * add `aligned` functions to Allocator interface * add `os.argsAlloc` and `os.argsFree` so that you can get a `[]const []u8`, do whatever arg parsing you want, and then free it. For now this uses the other API under the hood, but it could be reimplemented to do a single allocation. * add tests to make sure command line argument parsing works.
2017-12-04Merge branch 'master' into llvm6Andrew Kelley
2017-12-01update to LLVM 5.0.1rc2Andrew Kelley
2017-11-29update fast math llvm API to latestAndrew Kelley