- Aug 04, 2017
-
-
Yaxun Liu authored
OpenCL 2.0 atomic builtin functions have a scope argument which is ideally represented as synchronization scope argument in LLVM atomic instructions. Clang supports translating Clang atomic builtin functions to LLVM atomic instructions. However it currently does not support synchronization scope of LLVM atomic instructions. Without this, users have to use LLVM assembly code to implement OpenCL atomic builtin functions. This patch adds OpenCL 2.0 atomic builtin functions as Clang builtin functions, which supports generating LLVM atomic instructions with synchronization scope operand. Currently only constant memory scope argument is supported. Support of non-constant memory scope argument will be added later. Differential Revision: https://reviews.llvm.org/D28691 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310082 91177308-0d34-0410-b5e6-96231b3b80d8
-
Martin Probst authored
Summary: `case:` and `default:` would normally parse as labels for a `switch` block. However in TypeScript, they can be used in field declarations, e.g.: interface I { case: string; } This change special cases parsing them in declaration lines to avoid wrapping them. Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D36148 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310070 91177308-0d34-0410-b5e6-96231b3b80d8
-
Stefan Maksimovic authored
This is causing failures when compiling clang with -O3 as one of the structures used by clang is passed by value and uses the fastcc calling convention. Faliures manifest for stage2 mips build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310057 91177308-0d34-0410-b5e6-96231b3b80d8
-
Florian Hahn authored
Summary: M-class profiles do not support ARM execution mode, so providing -marm/-mno-thumb does not make sense in combination with -mcpu/-march options that support the M-profile. This is a follow-up patch to D35569 and it seemed pretty clear that we should emit an error in the driver in this case. We probably also should warn/error if the provided -mcpu/-march options do not match, e.g. -mcpu=cortex-m0 -march=armv8-a is invalid, as cortex-m0 does not support armv8-a. But that should be a separate patch I think. Reviewers: echristo, richard.barton.arm, rengolin, labrinea, charles.baylis Reviewed By: rengolin Subscribers: aemerson, javed.absar, kristof.beyls, cfe-commits Differential Revision: https://reviews.llvm.org/D35826 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310047 91177308-0d34-0410-b5e6-96231b3b80d8
-
Manuel Klimek authored
The hasDeclaration documentation was outdated after r288366. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310041 91177308-0d34-0410-b5e6-96231b3b80d8
-
Simon Atanasyan authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310038 91177308-0d34-0410-b5e6-96231b3b80d8
-
Simon Atanasyan authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310037 91177308-0d34-0410-b5e6-96231b3b80d8
-
NAKAMURA Takumi authored
It generates MODULE-XXXXXXXXXXXX-%%%%%%%%.pcm, then GlobalModuleIndex.cpp is confused with the suffix ".pcm" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310030 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vedant Kumar authored
This reverts commit r309995. It looks like it's responsible for breaking the stage2 coverage build: http://green.lab.llvm.org/green/job/clang-stage2-coverage-R_build/1402 The cfe-commits discussion re: r309995 has more context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310019 91177308-0d34-0410-b5e6-96231b3b80d8
-
Petr Hosek authored
The .gnu_hash format is superior, and all versions of the Fuchsia dynamic linker support it. Differential Revision: https://reviews.llvm.org/D36254 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310017 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vedant Kumar authored
The current coverage implementation doesn't handle region termination very precisely. Take for example an `if' statement with a `return': void f() { if (true) { return; // The `if' body's region is terminated here. } // This line gets the same coverage as the `if' condition. } If the function `f' is called, the line containing the comment will be marked as having executed once, which is not correct. The solution here is to create a deferred region after terminating a region. The deferred region is completed once the start location of the next statement is known, and is then pushed onto the region stack. In the cases where it's not possible to complete a deferred region, it can safely be dropped. Testing: lit test updates, a stage2 coverage-enabled build of clang git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310010 91177308-0d34-0410-b5e6-96231b3b80d8
-
Akira Hatanaka authored
This commit fixes a bug where clang/llvm doesn't emit an unwind table for a function when it is marked noexcept. Without this patch, the following code terminates with an uncaught exception on ARM64: int foo1() noexcept { try { throw 0; } catch (int i) { return 0; } return 1; } int main() { return foo1(); } rdar://problem/32411865 Differential Revision: https://reviews.llvm.org/D35693 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310006 91177308-0d34-0410-b5e6-96231b3b80d8
-
Petr Hosek authored
Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D35922 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309999 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eli Friedman authored
The code after a noreturn call doesn't execute. The pattern in the testcase is pretty common in LLVM (a switch with a default case that calls llvm_unreachable). Differential Revision: https://reviews.llvm.org/D36250 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309995 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 03, 2017
-
-
Nico Weber authored
This helps some tools that do things based on the output's extension. For example, we got reports from users on Windows that have a tool that scan a build output dir (but skip .obj files). The tool would keep the "foo.obj-12345" file open, and then when clang tried to rename the temp file to the final output filename, that would fail. By making the tempfile end in ".obj", tools like this will now skip the temp files as well. https://reviews.llvm.org/D36238 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309984 91177308-0d34-0410-b5e6-96231b3b80d8
-
Simon Dardis authored
This reverts commit r309942 & commit r309940. A revert was requested following post commit review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309978 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309976 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
Patch by ~paul (cynecx on phabricator)! Some test massaging by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309975 91177308-0d34-0410-b5e6-96231b3b80d8
-
Devin Coughlin authored
This change adds support for cross-file diagnostic paths in html output. If the diagnostic path is not cross-file, there is no change in the output. Patch by Vlad Tsyrklevich! Differential Revision: https://reviews.llvm.org/D30406 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309968 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
See discussion in https://reviews.llvm.org/D33900#824172 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309960 91177308-0d34-0410-b5e6-96231b3b80d8
-
Don Hinton authored
particular diagnostic. Differential Revision: https://reviews.llvm.org/D36252 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309955 91177308-0d34-0410-b5e6-96231b3b80d8
-
Gabor Horvath authored
Patch by: Reka Nikolett Kovacs git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309948 91177308-0d34-0410-b5e6-96231b3b80d8
-
Simon Dardis authored
Needed a // REQUIRES: mips-registered-target git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309942 91177308-0d34-0410-b5e6-96231b3b80d8
-
Krasimir Georgiev authored
Summary: This patch fixes the indentation of the code pattern `key <...>`and `key {...}` in text protos. Previously, such line would be alinged depending on the column of the previous colon, which usually indents too much. I'm gonna go ahead and commit this since it's a straightforward bugfix. Reviewers: djasper, klimek Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D36143 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309941 91177308-0d34-0410-b5e6-96231b3b80d8
-
Simon Dardis authored
This option when combined with -mgpopt and -membedded-data places all uninitialized constant variables in the read-only section. Reviewers: atanasyan, nitesh.jain Differential Revision: https://reviews.llvm.org/D35917 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309940 91177308-0d34-0410-b5e6-96231b3b80d8
-
Krasimir Georgiev authored
Summary: This patch fixes the parsing of proto option fields like `option op = <...>`. Previously the parser did not enter the right code path inside the angle braces, causing the contents to be split into several unwrapped lines inside. I'll just go ahead and commit this since it's a straightforward bugfix. Reviewers: djasper, klimek Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36217 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309937 91177308-0d34-0410-b5e6-96231b3b80d8
-
Simon Dardis authored
Add support for the -membedded-data option which places constant data in the .rodata section, rather than the .sdata section. Reviewers: atanasyan, nitesh.jain Differential Revision: https://reviews.llvm.org/D35914 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309935 91177308-0d34-0410-b5e6-96231b3b80d8
-
Rafael Espindola authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309912 91177308-0d34-0410-b5e6-96231b3b80d8
-
Tim Shen authored
Summary: The mis-compile is triggered by internal code, but I haven't reduced it to a small piece of code. Add a FIXME here, since a decent fix doesn't seem to be trivial. The decent fix can be changing Decl::Init to PointerUnion<Stmt *, EvaluatedStmt *, ParamVarDecl *>, and make setUninstantiatedDefaultArg take a ParamVarDecl *, which contains the Expr * as the default argument. This way, getTemplateInstantiationArgs can take that ParamVarDecl and do the right thing. Reviewers: rsmith Subscribers: sanjoy, cfe-commits Differential Revision: https://reviews.llvm.org/D36253 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309908 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eli Friedman authored
We never overwrite the end location of a region, so we would end up with an overly large region when we reused the switch's region. It's possible this code will be substantially rewritten in the near future to deal with fallthrough more accurately, but this seems like an improvement on its own for now. Differential Revision: https://reviews.llvm.org/D34801 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309901 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 02, 2017
-
-
Benjamin Kramer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309888 91177308-0d34-0410-b5e6-96231b3b80d8
-
Rafael Espindola authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309885 91177308-0d34-0410-b5e6-96231b3b80d8
-
Han Shen authored
Summary: This is to provide a default blacklist filename for UBSan. While UBSan is turned on, it's better that clang pick up a blacklist file (when exists), just as what ASan / MSan does, so we do not end up adding the "-fsanitize-blacklist" option to every command line. Reviewers: chandlerc, echristo, vsk, eugenis Reviewed By: vsk, eugenis Subscribers: vsk, eugenis, echristo, cfe-commits Differential Revision: https://reviews.llvm.org/D35849 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309873 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vedant Kumar authored
Bot failure: http://lab.llvm.org:8011/builders/clang-sphinx-docs/builds/12043/steps/docs-clang-html/logs/stdio git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309852 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vedant Kumar authored
In r309007, I made -fsanitize=null a hard prerequisite for -fsanitize=vptr. I did not see the need for the two checks to have separate null checking logic for the same pointer. I expected the two checks to either always be enabled together, or to be mutually compatible. In the mailing list discussion re: r309007 it became clear that that isn't the case. If a codebase is -fsanitize=vptr clean but not -fsanitize=null clean, it's useful to have -fsanitize=vptr emit its own null check. That's what this patch does: with it, -fsanitize=vptr can be used without -fsanitize=null. Differential Revision: https://reviews.llvm.org/D36112 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309846 91177308-0d34-0410-b5e6-96231b3b80d8
-
Walter Lee authored
Summary: This is required by the libc++ locale support. Reviewers: jyknight Subscribers: fedor.sergeev Differential Revision: https://reviews.llvm.org/D36121 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309815 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alex Lorenz authored
This function will be used by the clang-refactor's rename actions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309813 91177308-0d34-0410-b5e6-96231b3b80d8
-
Manuel Klimek authored
Originally, we weren't able to match on Type nodes themselves (only QualType), so the hasDeclaration matcher was initially written to give what we thought are reasonable results for QualType matches. When we chagned the matchers to allow matching on Type nodes, it turned out that the hasDeclaration matcher was by chance written templated enough to now allow hasDeclaration to also match on (some) Type nodes. This patch change the hasDeclaration matcher to: a) work the same on Type and QualType nodes, b) be completely explicit about what nodes we can match instead of just allowing anything with a getDecl() to match, c) explicitly control desugaring only one level in very specific instances. d) adds hasSpecializedTemplate and tagType matchers to allow migrating existing use cases that now need more explicit matchers Note: This patch breaks clang-tools-extra. The corresponding patch there is approved and will land in a subsequent patch. Differential Revision: https://reviews.llvm.org/D27104 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309809 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Marjamaki authored
Example: #define MACRO(C) if (C) { static int x; .. } void foo() { MACRO(0); } Differential Revision: https://reviews.llvm.org/D36141 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309799 91177308-0d34-0410-b5e6-96231b3b80d8
-
Ilya Biryukov authored
Summary: It used to call into llvm::sys::fs::make_absolute. Reviewers: akyrtzi, erikjv, bkramer, krasimir, klimek Reviewed By: klimek Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36155 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309795 91177308-0d34-0410-b5e6-96231b3b80d8
-