- Sep 20, 2016
-
-
Nick Lewycky authored
Replace 'isProvablyNonNull' with existing utility llvm::IsKnownNonNull which handles more cases. Noticed by inspection. Because of how the IR generation works, this isn't expected to cause an observable difference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281979 91177308-0d34-0410-b5e6-96231b3b80d8
-
Simon Dardis authored
This patch adds the msa.h header file containing the shorter names for the MSA instrinsics, e.g. msa_sll_b for builtin_msa_sll_b. Reviewers: vkalintiris, zoran.jovanovic Differential Review: https://reviews.llvm.org/D24674 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281975 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 19, 2016
-
-
Gabor Horvath authored
ArrayBoundChecker did not detect out of bounds memory access errors in case an array was allocated by the new expression. This patch resolves this issue. Patch by Daniel Krupp! Differential Revision: https://reviews.llvm.org/D24307 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281934 91177308-0d34-0410-b5e6-96231b3b80d8
-
Samuel Antao authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281923 91177308-0d34-0410-b5e6-96231b3b80d8
-
Yaxun Liu authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281915 91177308-0d34-0410-b5e6-96231b3b80d8
-
Dehao Chen authored
Remove InstructionCombining and its related pass from sample pgo passes as we can handle "invoke" correctly. Summary: We previously relies on InstructionCombining pass to remove invoke instructions. Now that we can inline invoke instructions correctly, we do not need these passes any more. Reviewers: dnovillo Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D24730 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281910 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexander Shaposhnikov authored
The struct CallStackFrame is in lib/AST/ExprConstant.cpp inside anonymous namespace. This diff reorders the fields and removes excessive padding. Test plan: make -j8 check-clang Differential revision: https://reviews.llvm.org/D23901 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281907 91177308-0d34-0410-b5e6-96231b3b80d8
-
Yaxun Liu authored
Differential Revision: https://reviews.llvm.org/D24626 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281904 91177308-0d34-0410-b5e6-96231b3b80d8
-
Neil Hickey authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281899 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Liu authored
Summary: Diff to r281457: - added a test case `CalculateRangesOfInsertionAroundReplacement`. Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D24606 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281891 91177308-0d34-0410-b5e6-96231b3b80d8
-
Martin Probst authored
Summary: Previously, clang-format would always insert an additional line break after the import block if the main body started with a comment, due to loosing track of the first non-import line. Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D24708 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281888 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vedant Kumar authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281881 91177308-0d34-0410-b5e6-96231b3b80d8
-
Devin Coughlin authored
Treat lines in projectMap.csv that start with '#' as comments. This enables a workflow where projects can be temporarily disabled with a comment describing when they should be turned back on. Differential Revision: https://reviews.llvm.org/D24709 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281880 91177308-0d34-0410-b5e6-96231b3b80d8
-
Dean Michael Berris authored
Just a test for now, adapted from x86_64 tests of XRay. This is one of 3 commits to different repositories of XRay ARM port. The other 2 are: https://reviews.llvm.org/D23931 (LLVM) https://reviews.llvm.org/D23933 (compiler-rt) Differential Revision: https://reviews.llvm.org/D23932 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281879 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 18, 2016
-
-
Martin Probst authored
Summary: `// taze: ... from ...` comments are used help tools where a specific global symbol comes from. Before: // taze: many, different, symbols from // 'some_long_location_here' After: // taze: many, different, symbols from 'some_long_location_here' Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D24477 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281857 91177308-0d34-0410-b5e6-96231b3b80d8
-
Martin Probst authored
Summary: Before when a semicolon was missing after a boolean literal: a = true return 1; clang-format would parse this as one line and format as: a = true return 1; It turns out that C++ does not consider `true` and `false` to be literals, we have to check for that explicitly. Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D24574 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281856 91177308-0d34-0410-b5e6-96231b3b80d8
-
Saleem Abdulrasool authored
These are all emitted into a section with a cstring_literal attribute. The attribute permits the linker to coalesce the string contents. The address of the strings are not important. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281855 91177308-0d34-0410-b5e6-96231b3b80d8
-
Saleem Abdulrasool authored
These strings are constants, mark them as such. This doesn't matter too much in practice on MachO since the constants are placed into a special section and not referred to directly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281854 91177308-0d34-0410-b5e6-96231b3b80d8
-
Kostya Serebryany authored
[libFuzzer] use 'if guard' instead of 'if guard >= 0' with trace-pc; change the guard type to intptr_t; use separate array for 8-bit counters git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281845 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 17, 2016
-
-
Eric Liu authored
When replacements have the same offset, make replacements with smaller length order first in the set. Summary: No behavioral change intended. The change makes iterating the replacements set more intuitive in Replacements class implementation. Previously, insertion is ordered before an deletion/replacement with the same offset, which is counter-intuitive for implementation, especially for a followup patch to support adding insertions around replacements. With the current ordering, we only need to make `applyAllReplacements` iterate the replacements set reversely when applying them so that deletion/replacement is still applied before insertion with the same offset. Reviewers: klimek, djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D24663 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281819 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281816 91177308-0d34-0410-b5e6-96231b3b80d8
-
Kostya Serebryany authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281809 91177308-0d34-0410-b5e6-96231b3b80d8
-
Saleem Abdulrasool authored
This refactors the cstring literal creation as mentioned in the couple of FIXMEs littered in the various invocations to CreateMetadataVar. This centralises the definition of the literals, and will enable changing the literal creation to a single site. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281798 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
* recurse through intermediate LabelStmts and AttributedStmts when checking whether a statement inside a switch declares a variable * if the end of a compound statement is reachable from the chosen case label, and the compound statement contains a variable declaration, it's not valid to just emit the contents of the compound statement -- we must emit the statement itself or we lose the scope (and thus end lifetimes at the wrong point) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281797 91177308-0d34-0410-b5e6-96231b3b80d8
-
Peter Collingbourne authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281796 91177308-0d34-0410-b5e6-96231b3b80d8
-
Peter Collingbourne authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281790 91177308-0d34-0410-b5e6-96231b3b80d8
-
Peter Collingbourne authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281785 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 16, 2016
-
-
Nirav Dave authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281753 91177308-0d34-0410-b5e6-96231b3b80d8
-
Saleem Abdulrasool authored
Address post-commit comments from Justin Bogner. Explicitly indicate that the dereferenced iterator provides a pointer rather than a reference. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281730 91177308-0d34-0410-b5e6-96231b3b80d8
-
Neil Hickey authored
Improve handling of floating point literals in OpenCL to only use double precision if the target supports fp64 https://reviews.llvm.org/D24235 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281714 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Fiselier authored
* Fix an egregious comma usage. * Remove the `static` keyword in the example since the variables should have external linkage. * Use C++11 attributes in the example. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281712 91177308-0d34-0410-b5e6-96231b3b80d8
-
Neil Hickey authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281711 91177308-0d34-0410-b5e6-96231b3b80d8
-
Stephen Hines authored
Summary: Offset was doubled in size, but the assignment was missing. We just need to reassign to the original variable in this case to fix it. Reviewers: cfe-commits, echristo Subscribers: meikeb Differential Revision: https://reviews.llvm.org/D24648 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281706 91177308-0d34-0410-b5e6-96231b3b80d8
-
John McCall authored
virtual table offset in a member function pointer. We are reserving this space for future ABI use relating to alternative v-table configurations. In the meantime, continue to zero-initialize this space when actually emitting a member pointer literal. This will successfully interoperate with existing compilers. Future versions of the compiler may place additional data in this location, and at that point, code emitted by compilers prior to this patch will fail if exposed to such a member pointer. This is therefore a somewhat hard ABI break. However, because it is limited to an uncommon case of an uncommon language feature, and especially because interoperation with the standard library does not depend on member pointers, we believe that with a sufficiently advance compiler change the impact of this break will be minimal in practice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281693 91177308-0d34-0410-b5e6-96231b3b80d8
-
Stephen Hines authored
Summary: The warning for a format string not being a string literal and therefore being potentially insecure is overly strict for indices into string literals. This fix checks if the index into the string literal is precomputable. If that's the case it will check if the suffix of that string literal is a valid format string string literal. It will still issue the aforementioned warning for out of range indices into the string literal. Patch by Meike Baumgärtner (meikeb) Reviewers: rsmith Subscribers: srhines, cfe-commits Differential Revision: https://reviews.llvm.org/D24584 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281686 91177308-0d34-0410-b5e6-96231b3b80d8
-
Akira Hatanaka authored
field in the enclosing lambda or block. This patch fixes a bug in code-gen where it uses the type of the declared variable rather than the type of the capture of the enclosing lambda or block for the block capture. For example, in the following function, code-gen currently uses i32* for the block capture "a" because "a" is passed to foo1 as a reference, but it should use i32 since the enclosing lambda captures "a" by value. void foo1(int &a) { auto lambda = [a]{ auto block1 = ^{ i = a; }; block1(); }; lambda(); } rdar://problem/18586386 Differential Revision: https://reviews.llvm.org/D21104 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281682 91177308-0d34-0410-b5e6-96231b3b80d8
-
Justin Lebar authored
Summary: Sanitizers aren't supported on NVPTX -- don't try to run them. This lets you e.g. pass -fsanitize=address and get asan on your host code. Reviewers: kcc Subscribers: cfe-commits, tra, jhen Differential Revision: https://reviews.llvm.org/D24640 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281680 91177308-0d34-0410-b5e6-96231b3b80d8
-
Akira Hatanaka authored
r278501 inadvertently introduced a bug in which it disallowed shifting scalar operands by vector operands when not compiling for OpenCL. This commit fixes it. Patch by Vladimir Yakovlev. Differential Revision: https://reviews.llvm.org/D24467 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281669 91177308-0d34-0410-b5e6-96231b3b80d8
-
David L. Jones authored
Currently, the Clang version is computed as follows: 1. LLVM defines major, minor, and patch versions, all statically set. Today, these are 4, 0, and 0, respectively. 2. The static version numbers are combined into PACKAGE_VERSION along with a suffix, so the result today looks like "4.0.0svn". 3. Clang extracts CLANG_VERSION from PACKAGE_VERSION using a regexp. The regexp allows the patch level to omitted, and drops any non-digit trailing values. Today, this result looks like "4.0.0". 4. CLANG_VERSION is then split further into CLANG_VERSION_MAJOR and CLANG_VERSION_MINOR. Today, these resolve to 4 and 0, respectively. 5. If CLANG_VERSION matches a regexp with three version components, then CLANG_VERSION_PATCHLEVEL is extracted and the CLANG_HAS_VERSION_PATCHLEVEL variable is set to 1. Today, these values are 0 and 1, respectively. 6. The CLANG_VERSION_* variables (and CLANG_HAS_VERSION_PATCHLEVEL) are configured into [llvm/tools/clang/]include/clang/Basic/Version.inc verbatim by CMake. 7. In [llvm/tools/clang/]include/clang/Basic/Version.h, macros are defined conditionally, based on CLANG_HAS_VERSION_PATCHLEVEL, to compute CLANG_VERSION_STRING as either a two- or three-level version number. Today, this value is "4.0.0", because despite the patchlevel being 0, it was matched by regexp and is thus "HAS"ed by the preprocessor. This string is then used wherever Clang's "version" is needed [*]. [*] Including, notably, by compiler-rt, for computing its installation path. This change collapses steps 2-5 by defaulting Clang to use LLVM's (non-string) version components for the Clang version (see [*] for why not PACKAGE_VERSION), and collapses steps 6 and 7 by simply writing CLANG_VERSION_STRING into Version.inc. The Clang version today always uses the patchlevel form, so the collapsed Version.inc does not have logic for a version without a patch level. Historically speaking, this technique began with the VER file in r82085 (which survives in the form of the regexp in #3). The major, minor, and patchlevel versions were introduced by r106863 (which remains in #4-6). The VER file itself was deleted in favor of the LLVM version number in r106914. On the LLVM side, the individual LLVM_VERSION_MAJOR, LLVM_VERSION_MINOR, and PACKAGE_VERSION weren't introduced for nearly two more years, until r150405. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281666 91177308-0d34-0410-b5e6-96231b3b80d8
-
Kostya Serebryany authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281665 91177308-0d34-0410-b5e6-96231b3b80d8
-