- Dec 06, 2016
-
-
Chris Bieneman authored
It is kinda crazy to have llvm/include and llvm/lib/Target in the include path for every tablegen invocation for every tablegen-like tool. This patch removes those flags from the tablgen function that is called everywhere by instead creating a variable LLVM_TABLEGEN_FLAGS which is setup in the LLVM source directories. This removes TableGen.cmake's dependency on LLVM_MAIN_SRC_DIR, and LLVM_MAIN_INCLUDE_DIR. llvm-svn: 288770
-
Meador Inge authored
A recent commit (r286087) to the LLVM Go bindings that changed things over to use the new attribute API broke llgo. This commit updates llgo accordingly. llvm-svn: 288769
-
Meador Inge authored
Two recent commits to the LLVM Go bindings caused breaking changes to llgo: 1. r284707 - Moving the `AlignInBits` field from `DIBasicType` to `DIAutoVariable`. 2. r284482 - The `AlignInBits` fields going from `uint64` to `uint32`. This commit updates llgo accordingly. llvm-svn: 288768
-
Philip Reames authored
Integers are expressed in the lattice via constant ranges. They can never be represented by constants or not-constants; those are reserved for non-integer types. This code has been dead for literaly years. llvm-svn: 288767
-
Philip Reames authored
Extracting a helper function out of solveBlockValue makes the contract around the cache much easier to understand. llvm-svn: 288766
-
Philip Reames authored
This completes a small series of patches to hide the stateful updates of LVILatticeVal from the consuming code. The only remaining stateful API is mergeIn. llvm-svn: 288765
-
Philip Reames authored
llvm-svn: 288764
-
Mandeep Singh Grang authored
Summary: Related clang patch; https://reviews.llvm.org/D27360 Reviewers: t.p.northover, grosbach, compnerd, echristo Subscribers: compnerd, mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D27359 llvm-svn: 288763
-
Mandeep Singh Grang authored
Summary: Related llvm patch: https://reviews.llvm.org/D27359 Reviewers: echristo, t.p.northover, rengolin, grosbach, compnerd Subscribers: mehdi_amini, cfe-commits, llvm-commits Tags: #clang-c Differential Revision: https://reviews.llvm.org/D27360 llvm-svn: 288762
-
Philip Reames authored
llvm-svn: 288761
-
Casey Carter authored
Differential review: http://reviews.llvm.org/D27436 llvm-svn: 288760
-
Davide Italiano authored
This reverts commit r288725 as it broke a bot. llvm-svn: 288759
-
Zijiao Ma authored
The TargetParser tests are a bit redundant. Refactor them in a more repeatable way. llvm-svn: 288758
-
Rui Ueyama authored
This change seems to make LLD 0.6% faster when linking Clang with debug info. I don't want us to have lots of local optimizations, but this function is very hot, and the improvement is small but not negligible, so I think it's worth doing. llvm-svn: 288757
-
Richard Trieu authored
- Rename CheckMinZero to CheckMaxUnsignedZero to reflect its actual purpose. - Remove unused parameters from CheckAbsoluteValueFunction and CheckMaxUnsignedZero functions. - Refactor the function name check so both functions can use the same one. llvm-svn: 288756
-
Eric Fiselier authored
llvm-svn: 288755
-
Mehdi Amini authored
Summary: We recently introduced a feature that enforce at link-time that the LLVM headers used by a clients are matching the ABI setting of the LLVM library linked to. However for clients that are using only headers from ADT and promise they won't call into LLVM, this is forcing to link libSupport. This new flag is intended to provide a way to configure LLVM with this promise for such client. Reviewers: bob.wilson, compnerd Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D27432 llvm-svn: 288754
-
Stephan T. Lavavej authored
[libcxx] [test] D27269: Fix MSVC x64 warning C4267 "conversion from 'size_t' to 'int' [or 'unsigned int'], possible loss of data", part 3/4. test/std/containers/sequences/vector.bool/copy.pass.cpp test/std/containers/sequences/vector.bool/copy_alloc.pass.cpp test/std/containers/sequences/vector/vector.cons/copy.pass.cpp test/std/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp Change "unsigned s = x.size();" to "typename C::size_type s = x.size();" because that's what it returns. test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp Include <cstddef>, then change "unsigned n = T::length(s);" to "std::size_t n = T::length(s);" because that's what char_traits returns. test/std/strings/basic.string/string.cons/substr.pass.cpp Change unsigned to typename S::size_type because that's what str.size() returns. test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp This was needlessly truncating std::size_t to unsigned. It's being used to compare and initialize std::size_t. llvm-svn: 288753
-
Stephan T. Lavavej authored
[libcxx] [test] D27268: Fix MSVC x64 warning C4267 "conversion from 'size_t' to 'int' [or 'unsigned int'], possible loss of data", part 2/4. Use static_cast<int> when storing size_t in int (or passing size_t to int). Also, remove a spurious semicolon in test/support/archetypes.hpp. test/support/count_new.hpp Additionally, change data members (and parameters) to size_t. llvm-svn: 288752
-
Stephan T. Lavavej authored
[libcxx] [test] D27267: Fix MSVC x64 warning C4267 "conversion from 'size_t' to 'int' [or 'unsigned int'], possible loss of data", part 1/4. Replace "int n = str_.size();" with "int n = static_cast<int>(str_.size());". int is the correct type to use, because we're eventually calling "base::pbump(n+1);" where base is std::basic_streambuf. N4606 27.6.3.3.3 [streambuf.put.area]/4 declares: "void pbump(int n);" llvm-svn: 288751
-
Stephan T. Lavavej authored
llvm-svn: 288750
-
Stephan T. Lavavej authored
Various changes: test/std/algorithms/alg.sorting/alg.merge/inplace_merge.pass.cpp This is comparing value_type to unsigned. value_type is sometimes int and sometimes struct S (implicitly constructible from int). static_cast<value_type>(unsigned) silences the warning and doesn't do anything bad (as the values in question are small). test/std/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp This is comparing an int remote-element to size_t. The values in question are small and non-negative, so either type is fine. I think that converting int to size_t is marginally better here than the reverse. test/std/containers/sequences/deque/deque.cons/size.pass.cpp DefaultOnly::count is int (and non-negative). When comparing to unsigned, use static_cast<unsigned>. test/std/strings/basic.string/string.access/index.pass.cpp We're comparing char to '0' through '9', but formed with the type size_t. Add static_cast<char>. test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp Include <cstddef> for pedantic correctness (this test was already mentioning std::size_t). "v[i] == (i & 1)" was comparing bool to size_t. Saying "v[i] == ((i & 1) != 0)" smashes the RHS to bool. llvm-svn: 288749
-
Stephan T. Lavavej authored
Change "unsigned n = 0;" to "int n = 0;". It's being compared to int elements and ptrdiff_t distances. test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp This one's a little special, but not really. "*i == n" is comparing MoveOnly to n. MoveOnly is implicitly constructible from int, so int is the correct type to use here. llvm-svn: 288748
-
Stephan T. Lavavej authored
Add static_cast<int>. In these cases, the values are guaranteed to be small-ish, and they're being compared to int elements. test/std/containers/sequences/deque/deque.capacity/access.pass.cpp Use int instead of unsigned to iterate from 0 to 10. llvm-svn: 288747
-
Stephan T. Lavavej authored
Add static_cast<std::size_t> to more comparisons. (Performed manually, unlike part 8/12.) Also, include <cstddef> when it wasn't already being included. llvm-svn: 288746
-
Stephan T. Lavavej authored
Add static_cast<std::size_t> when comparing distance() to size(). These replacements were performed programmatically with regex_replace(): const vector<pair<regex, string>> reg_fmt = { { regex(R"(assert\((\w+)\.size\(\) == std::distance\((\w+, \w+)\)\))"), "assert($1.size() == static_cast<std::size_t>(std::distance($2)))" }, { regex(R"(assert\(distance\((\w+\.begin\(\), \w+\.end\(\))\) == (\w+)\.size\(\)\))"), "assert(static_cast<std::size_t>(distance($1)) == $2.size())" }, { regex(R"(assert\(std::distance\((\w+\.\w*begin\(\), \w+\.\w*end\(\))\) == (\w+)\.size\(\)\))"), "assert(static_cast<std::size_t>(std::distance($1)) == $2.size())" }, }; Also, include <cstddef> when it wasn't already being included. llvm-svn: 288745
-
Matt Arsenault authored
The structured CFG is just an aid to inserting exec mask modification instructions, once that is done we don't really need it anymore. We also do not analyze blocks with terminators that modify exec, so this should only be impacting true branches. llvm-svn: 288744
-
Eric Fiselier authored
llvm-svn: 288743
-
Bob Haarman authored
revert inadvertedly introduced build break Summary: r288722 introduced a build break due some code that should not have been part of the commit. This change removes the offending code. Reviewers: davide, ruiu Differential Revision: https://reviews.llvm.org/D27435 llvm-svn: 288742
-
Richard Smith authored
Recover better from an incompatible .pcm file being provided by -fmodule-file=. We try to include the headers of the module textually in this case, still enforcing the modules semantic rules. In order to make that work, we need to still track that we're entering and leaving the module. Also, if the module was also marked as unavailable (perhaps because it was missing a file), we shouldn't mark the module unavailable -- we don't need the module to be complete if we're going to enter it textually. llvm-svn: 288741
-
Richard Trieu authored
llvm-svn: 288740
-
Richard Smith authored
llvm-svn: 288738
-
Richard Smith authored
import can't appear here" diagnostic if an already-visible module is textually entered (because we have the module map but not the AST file) within a function/namespace scope. llvm-svn: 288737
-
Eric Fiselier authored
The Clang modules implementation breaks enough that libc++ needs an easy way to enable/disable using modules on the Zorg builders. Editing Zorg itself requires a buildmaster restart which only happens weekly. This patch allows LIBCXX_USE_MODULES to be used to enable/disable the feature, allowing the buildslave to disable it as need be. llvm-svn: 288736
-
Eric Fiselier authored
llvm-svn: 288735
-
Weiming Zhao authored
clang -target arm deprecated-asm.s -c deprecated-asm.s:30:9: warning: use of SP or PC in the list is deprecated stmia r4!, {r12-r14} We have to have an option what can disable it. Patched by Yin Ma! Reviewers: joey, echristo, weimingz Subscribers: llvm-commits, aemerson Differential Revision: https://reviews.llvm.org/D27219 llvm-svn: 288734
-
Eric Fiselier authored
llvm-svn: 288733
-
Richard Trieu authored
New default warning that triggers when an unsigned zero is used in a call to std::max. For unsigned values, zero is the minimum value, so any call to std::max is always equal to the other value. A common pattern was to take the max of zero and the difference of two unsigned values, not taking into account that unsigned values wrap around below zero. This warning also emits a note with a fixit hint to remove the zero and call to std::max. llvm-svn: 288732
-
Kostya Serebryany authored
[libFuzzer] refactor the code to allow collecting features in different ways. Also initialize a couple of Fuzzer:: members that might have been used uninitialized :( llvm-svn: 288731
-
Eric Fiselier authored
llvm-svn: 288730
-