- Mar 08, 2019
-
-
Hyrum Wright authored
This function is always used in a context where its result was also negated, which made for confusing naming and code. llvm-svn: 355702
-
Manman Ren authored
r355343 was landed and was reverted in r355363 due to build breakage. This patch adds Linux/Windows support on top of r355343. In this patch, Darwin should be working with testing case. Linux should be working, I will enable the testing case in a follwup diff. Windows/Other should be building. Correct implementation for Other platforms will be added. Thanks David for reviewing the original diff, helping me with issues on Linux, and giving suggestions for adding support for Other platforms. llvm-svn: 355701
-
Akira Hatanaka authored
The type of wide string literals varies depending on the target. llvm-svn: 355700
-
Simon Pilgrim authored
llvm-svn: 355699
-
Erich Keane authored
r355322 fixed this, however is being reverted due to concerns with enabling it in other modes. Change-Id: I6a939b7469b8fa196d5871a627eb2330dbd30f29 llvm-svn: 355698
-
Erich Keane authored
This reverts commit 24400dafe16716f28cd0e7e5fa6e004c0e50686a. llvm-svn: 355697
-
James Henderson authored
llvm-readelf prints relocation addends as: <symbol value>[+-]<absolute addend> where [+-] is determined from whether addend is less than zero or not. However, it does not print the +/- if there is no symbol, which meant that negative addends became their positive value with no indication that this had happened. This patch stops the absolute conversion when addends are negative and there is no associated symbol. Reviewed by: Higuoxing, mattd, MaskRay Differential Revision: https://reviews.llvm.org/D59095 llvm-svn: 355696
-
Nico Weber authored
llvm-svn: 355695
-
Nico Weber authored
From the Python subprocess docs: If shell is True, it is recommended to pass args as a string rather than as a sequence. [...] If args is a sequence, the first item specifies the command string, and any additional items will be treated as additional arguments to the shell itself. Prior to this change, the `--version` would be passed to the shell, not to a potential gn binary on $PATH, and running `gn` without any arguments makes it exit with an exit code != 0, so the script would think that there wasn't a working gn binary on $PATH. Fix this by following the documentation's recommendation of using a string now that we pass shell=True. I tested this on macOS and Windows, each with the three cases of - no gn on PATH (should run gn downloaded by get.py if present, else suggest running get.py) - broken gn wrapper on PATH (should behave like the previous item) - working gn on PATH (should use gn on PATH) llvm-svn: 355694
-
Nico Weber authored
`os.uname()` doesn't exist on Windows, so use `platform.machine()` which returns `os.uname()[4]` on non-Win and (on 64-bit systems) "AMD64" on Windows. Also use `sys.platform` instead of `platform` to check for Windows-ness for the file extension in gn.py (get.py got this right). Differential Revision: https://reviews.llvm.org/D59115 llvm-svn: 355693
-
Clement Courbet authored
Add `bcmp` after r355672. llvm-svn: 355692
-
Simon Pilgrim authored
llvm-svn: 355690
-
Simon Pilgrim authored
llvm-svn: 355689
-
Simon Pilgrim authored
llvm-svn: 355688
-
Petar Jovanovic authored
The following GCC intrinsics are not available on MIPS32: __sync_fetch_and_add_8 __sync_fetch_and_and_8 __sync_fetch_and_or_8 __sync_val_compare_and_swap_8 Replace these with appropriate libatomic implementation. Patch by Miodrag Dinic. Differential Revision: https://reviews.llvm.org/D45691 llvm-svn: 355687
-
Michael Platings authored
Use this feature to fix a bug on ARM where 4 byte alignment is incorrectly assumed. Differential Revision: https://reviews.llvm.org/D57335 llvm-svn: 355685
-
Benjamin Kramer authored
Otherwise including this header from more than one place will break linking. llvm-svn: 355684
-
Kadir Cetinkaya authored
llvm-svn: 355683
-
Hans Wennborg authored
We will now warn about such options being unused, which is better than the current "no such file or directory: '/d2foo'" errors. Note that we can still handle specific flags separately, e.g. we were already ignoring /d2FastFail and /d2Zi+ llvm-svn: 355682
-
Kadir Cetinkaya authored
Reviewers: hokein Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59084 llvm-svn: 355681
-
Haojian Wu authored
Reviewers: gribozavr Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59128 llvm-svn: 355680
-
Kadir Cetinkaya authored
Reviewers: gribozavr Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58815 llvm-svn: 355679
-
Kadir Cetinkaya authored
Summary: GetAllFiles interface returns absolute paths, but keeps dots and dot dots. This patch makes those paths canonical by deleting them. Reviewers: hokein Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59079 llvm-svn: 355678
-
Haojian Wu authored
Summary: Currently, we only do deduplication when we flush final results. We may have huge duplications (refs from headers) during the indexing period (running clangd-indexer on Chromium). With this change, clangd-indexer can index the whole chromium projects (48 threads, 40 GB peak memory usage). Reviewers: kadircet Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, mgrang, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59092 llvm-svn: 355676
-
Clement Courbet authored
Summary: Right now, when we encounter a string equality check, e.g. `if (memcmp(a, b, s) == 0)`, we try to expand to a comparison if `s` is a small compile-time constant, and fall back on calling `memcmp()` else. This is sub-optimal because memcmp has to compute much more than equality. This patch replaces `memcmp(a, b, s) == 0` by `bcmp(a, b, s) == 0` on platforms that support `bcmp`. `bcmp` can be made much more efficient than `memcmp` because equality compare is trivially parallel while lexicographic ordering has a chain dependency. Subscribers: fedor.sergeev, jyknight, ckennelly, gchatelet, llvm-commits Differential Revision: https://reviews.llvm.org/D56593 llvm-svn: 355672
-
Carl Ritson authored
Summary: Fix a bug in the scheduling model where V_CVT_F32_UBYTE{0,1,2,3} are incorrectly marked as quarter rate instructions. Reviewers: arsenm, rampitec Reviewed By: rampitec Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59091 llvm-svn: 355671
-
Hans Wennborg authored
llvm-svn: 355670
-
Kadir Cetinkaya authored
Summary: As can be seen in https://github.com/llvm-mirror/clang/blob/master/lib/Tooling/Tooling.cpp#L385 clang tool invocations adjust commands normally like this. In clangd we have different code paths for invoking a frontend action(preamble builds, ast builds, background index, clangd-indexer) they all work on the same GlobalCompilationDatabase abstraction, but later on are subject to different modifications. This patch makes sure all of the clangd actions make use of the same compile commands before invocation. Enables background-index to work on chromium codebase(since they had dependency file output in their compile commands). Reviewers: gribozavr, hokein Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59086 llvm-svn: 355669
-
Kadir Cetinkaya authored
Summary: In current indexing logic we get references to class itself when we see a constructor/destructor which is only syntactically true. Semantically this information is not correct. This patch marks that reference as NameReference to let clients deal with it. Reviewers: akyrtzi, gribozavr, nathawes, benlangmuir Reviewed By: gribozavr, nathawes Subscribers: nathawes, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58814 llvm-svn: 355668
-
Craig Topper authored
We were just checking pointer size and type primitive size. But this caused unintended things like vectors of half being accepted by masked load/store. For FP we now explicitly check for only double and float. For pointers we now let any pointer through. Trusting that only 32 and 64 would be used to generate assembly. We only check bitwidth after checking that the type is an integer. llvm-svn: 355667
-
Petr Hosek authored
This was omitted in r355655 causing the test to fail. llvm-svn: 355666
-
Petr Hosek authored
This change is a consequence of the discussion in "RFC: Place libs in Clang-dedicated directories", specifically the suggestion that libunwind, libc++abi and libc++ shouldn't be using Clang resource directory. Tools like clangd make this assumption, but this is currently not true for the LLVM_ENABLE_PER_TARGET_RUNTIME_DIR build. This change addresses that by moving the output of these libraries to lib/<target> and include/ directories, leaving resource directory only for compiler-rt runtimes and Clang builtin headers. Differential Revision: https://reviews.llvm.org/D59013 llvm-svn: 355665
-
Akira Hatanaka authored
Build bots were failing because wide string literals don't have type 'int *' on some targets. llvm-svn: 355664
-
Steven Wu authored
Summary: In r349534, objc arc implementation is switched to use intrinsics and at the same time, clang.arc.use is renamed to llvm.objc.clang.arc.use to make the naming more consistent. The side-effect of that is llvm no longer recognize it as intrinsics and codegen external references to it instead. Rather than upgrade the old intrinsics name to the new one and wait for the arc-contract pass to remove it, simply remove it in the bitcode upgrader. rdar://problem/48607063 Reviewers: pete, ahatanak, erik.pilkington, dexonsmith Reviewed By: pete, dexonsmith Subscribers: jkorous, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59112 llvm-svn: 355663
-
Akira Hatanaka authored
expression inside the parentheses is a valid UTF-8 string literal. Previously clang emitted an expression like @("abc") as a message send to stringWithUTF8String. This commit makes clang emit the boxed expression as a compile-time constant instead. This commit also has the effect of silencing the nullable-to-nonnull conversion warning clang started emitting after r317727, which originally motivated this commit (see https://oleb.net/2018/@keypath). rdar://problem/42684601 Differential Revision: https://reviews.llvm.org/D58729 llvm-svn: 355662
-
Jason Molenda authored
get_llvm_bin_dirs(). llvm-svn: 355661
-
JF Bastien authored
Summary: Following up with r355181, initialize small arrays as well. LLVM stage2 shows a tiny size gain. <rdar://48523005> Reviewers: glider, pcc, kcc, rjmccall Subscribers: jkorous, dexonsmith, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58885 llvm-svn: 355660
-
Craig Topper authored
Remove the -Wno-ignored-attributes. Add -fno-lax-vector-conversions Also use -ffreestanding instead of defining _MM_MALLOC_H. llvm-svn: 355659
-
Jonas Devlieghere authored
And run the actual binary so we load the shared libraries. llvm-svn: 355658
-
Jonas Devlieghere authored
The overload and/or template specialization are regular functions and should be marked inline when implemented in the header. Writing the previous commit message should've made that obvious but I was already overthinking it. This will fix the windows bot. llvm-svn: 355657
-