#
85a83c2c |
| 01-Jun-2017 |
Vedant Kumar <vsk@apple.com> |
[Modules] Handle sanitizer feature mismatches when importing modules
This patch makes it an error to have a mismatch between the enabled sanitizers in a CU, and in any module being imported into the
[Modules] Handle sanitizer feature mismatches when importing modules
This patch makes it an error to have a mismatch between the enabled sanitizers in a CU, and in any module being imported into the CU. Only mismatches between non-modular sanitizers are treated as errors.
This patch also includes non-modular sanitizers in module hashes, in order to ensure module rebuilds occur when -fsanitize=X is toggled on and off for non-modular sanitizers, and to cut down on module rebuilds when the option is toggled for modular sanitizers.
This fixes a longstanding issue with implicit modules and sanitizers, which Duncan originally diagnosed.
When building with implicit modules it's possible to hit a scenario where modules are built without -fsanitize=address, and are subsequently imported into CUs with -fsanitize=address enabled. This causes strange failures at runtime. The case Duncan found affects libcxx, since its vector implementation behaves differently when ASan is enabled.
Implicit module builds should "just work" when -fsanitize=X is toggled on and off across multiple compiler invocations, which is what this patch does.
Differential Revision: https://reviews.llvm.org/D32724
llvm-svn: 304463
show more ...
|
#
4b2f3269 |
| 31-May-2017 |
Reid Kleckner <rnk@google.com> |
[clang-cl] Improve default calling convention flag handling
Ignore default CC flags that don't make sense for the target arch. This is consistent with MSVC.
Addresses part of PR33237
llvm-svn: 304
[clang-cl] Improve default calling convention flag handling
Ignore default CC flags that don't make sense for the target arch. This is consistent with MSVC.
Addresses part of PR33237
llvm-svn: 304305
show more ...
|
Revision tags: llvmorg-4.0.1-rc2 |
|
#
6aa9e9b4 |
| 29-May-2017 |
Mehdi Amini <joker.eph@gmail.com> |
IRGen: Add optnone attribute on function during O0
Amongst other, this will help LTO to correctly handle/honor files compiled with O0, helping debugging failures. It also seems in line with how we h
IRGen: Add optnone attribute on function during O0
Amongst other, this will help LTO to correctly handle/honor files compiled with O0, helping debugging failures. It also seems in line with how we handle other options, like how -fnoinline adds the appropriate attribute as well.
Differential Revision: https://reviews.llvm.org/D28404
llvm-svn: 304127
show more ...
|
#
d46083cc |
| 25-May-2017 |
Erich Keane <erich.keane@intel.com> |
Revert MSVC CXXOperatorNames patch due to issues with Chromium
llvm-svn: 303882
|
#
25411b76 |
| 24-May-2017 |
Erich Keane <erich.keane@intel.com> |
For Microsoft compatibility, set fno_operator_names
There's a Microsoft header in the Windows SDK which won't compile with clang because it uses an operator name (and) as a field name. This patch
For Microsoft compatibility, set fno_operator_names
There's a Microsoft header in the Windows SDK which won't compile with clang because it uses an operator name (and) as a field name. This patch allows that file to compile by setting the option which disables operator names. The header which doesn't compile <Query.h> C:/Program Files (x86)/ Windows Kits/10/include/10.0.14393.0/um\Query.h:259:40: error: expected member name or ';' after declaration specifiers
/* [case()] */ NODERESTRICTION or; ~~~~~~~~~~~~~~~ ^
1 error generated.
Contributed for Melanie Blower
Differential Revision:https://reviews.llvm.org/D33505
llvm-svn: 303798
show more ...
|
#
af69e40c |
| 23-May-2017 |
Ilya Biryukov <ibiryukov@google.com> |
Allow to use vfs::FileSystem for file accesses inside ASTUnit.
Reviewers: bkramer, krasimir, arphaman, akyrtzi
Reviewed By: bkramer
Subscribers: klimek, cfe-commits
Differential Revision: https:/
Allow to use vfs::FileSystem for file accesses inside ASTUnit.
Reviewers: bkramer, krasimir, arphaman, akyrtzi
Reviewed By: bkramer
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D33397
llvm-svn: 303630
show more ...
|
#
0c7d4d7e |
| 22-May-2017 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add option to include multiple lines in snippets.
When a diagnostic includes a highlighted range spanning multiple lines, clang now supports printing out multiple lines of context if necessary to sh
Add option to include multiple lines in snippets.
When a diagnostic includes a highlighted range spanning multiple lines, clang now supports printing out multiple lines of context if necessary to show the highlighted ranges. This is not yet exposed in the driver, but can be enabled by "-Xclang -fcaret-diagnostics-max-lines -Xclang N".
This is experimental until we can find out whether it works well in practice, and if so, what a good default for the maximum number of lines is.
llvm-svn: 303589
show more ...
|
#
d991cdd5 |
| 09-May-2017 |
Evgeniy Stepanov <eugeni.stepanov@gmail.com> |
[asan] A clang flag to enable ELF globals-gc.
This feature is subtly broken when the linker is gold 2.26 or earlier. See the following bug for details: https://sourceware.org/bugzilla/show_bug.cgi
[asan] A clang flag to enable ELF globals-gc.
This feature is subtly broken when the linker is gold 2.26 or earlier. See the following bug for details: https://sourceware.org/bugzilla/show_bug.cgi?id=19002
Since the decision needs to be made at compilation time, we can not test the linker version. The flag is off by default on ELF targets, and on otherwise.
llvm-svn: 302591
show more ...
|
#
50fb618b |
| 05-May-2017 |
Kostya Serebryany <kcc@google.com> |
[sanitizer-coverage] implement -fsanitize-coverage=no-prune,... instead of a hidden -mllvm flag. clang part.
llvm-svn: 302320
|
#
5511fc2e |
| 03-May-2017 |
Yuka Takahashi <yukatkh@gmail.com> |
Revert rL301998: "Fix a bug that -isysroot is completely ignored on Unix"
This reverts commit because it broke sanitizer-x86_64-linux-autoconf bot and clang-ppc64be-linux-multistage bot.
llvm-svn:
Revert rL301998: "Fix a bug that -isysroot is completely ignored on Unix"
This reverts commit because it broke sanitizer-x86_64-linux-autoconf bot and clang-ppc64be-linux-multistage bot.
llvm-svn: 302000
show more ...
|
#
79d31071 |
| 03-May-2017 |
Yuka Takahashi <yukatkh@gmail.com> |
Fix a bug that -isysroot is completely ignored on Unix
-isysroot is the flag which set the system root directory. This bug report https://bugs.llvm.org//show_bug.cgi?id=11503 shows that -isysroot is
Fix a bug that -isysroot is completely ignored on Unix
-isysroot is the flag which set the system root directory. This bug report https://bugs.llvm.org//show_bug.cgi?id=11503 shows that -isysroot is not handled at all on Unix, so fixed this bug.
After this diff, I could get this result https://pastebin.com/TeCmn9mj .
Differential Revision: https://reviews.llvm.org/D31495
llvm-svn: 301998
show more ...
|
#
f74d9466 |
| 28-Apr-2017 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Move functionality for handling module maps as inputs from the -emit-module action to the general FrontendAction infrastructure.
This permits applying -E, -ast-dump, -fsyntax-only, and so on to a mo
Move functionality for handling module maps as inputs from the -emit-module action to the general FrontendAction infrastructure.
This permits applying -E, -ast-dump, -fsyntax-only, and so on to a module map compilation. (The -E form is not currently especially useful yet as there's no good way to take the output and use it to actually build a module.)
In order to support this, -cc1 now accepts -x <lang>-module-map in all cases where it accepts -x <lang> for a language we can parse (not ir/ast). And for uniformity, we also accept -x <lang>-header for all such languages (we used to reject for cuda and renderscript), and -x <lang>-cpp-output for all such languages (we used to reject for c, cl, and renderscript).
(None of these new alternatives are accepted by the driver yet, so no user-visible changes.)
llvm-svn: 301610
show more ...
|
Revision tags: llvmorg-4.0.1-rc1 |
|
#
8c8fb804 |
| 27-Apr-2017 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Improve diagnostics for bad -std= flag.
Don't list deprecated -std= values (c++0x etc). Only produce one line of output per standard, even if we know it by multiple names.
In passing, add missing -
Improve diagnostics for bad -std= flag.
Don't list deprecated -std= values (c++0x etc). Only produce one line of output per standard, even if we know it by multiple names.
In passing, add missing -std=gnu++03 alias (supported by GCC), and add new spelling '-std=cl1.0' for OpenCL 1.0 for consistency with the other values, with the same meaning as the preexisting '-std=cl'.
llvm-svn: 301507
show more ...
|
#
6379cfc5 |
| 26-Apr-2017 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Remove unnecessary and somewhat inaccurate "C89" flag from language standards.
llvm-svn: 301500
|
#
b0fe7045 |
| 26-Apr-2017 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't accept -std= values that would switch us to a different source language.
We already prohibited this in most cases (in r130710), but had some bugs in our enforcement of this rule. Specifically,
Don't accept -std= values that would switch us to a different source language.
We already prohibited this in most cases (in r130710), but had some bugs in our enforcement of this rule. Specifically, this prevents the following combinations:
* -x c -std=clN.M, which would previously effectively act as if -x cl were used, despite the input being a C source file. (-x cl -std=cNN continues to be disallowed.)
* -x c++ -std=cuda, which would previously select C++98 + CUDA, despite that not being a C++ standard. (-x cuda -std=c++NN is still permitted, and selects CUDA with the given C++ standard as its base language. -x cuda -std=cuda is still supported with the meaning of CUDA + C++98.)
* -x renderscript -std=c++NN, which would previously form a hybrid "C++ with RenderScript extensions" language. We could support such a thing, but shouldn't do so by accident.
llvm-svn: 301497
show more ...
|
#
40c0efa5 |
| 26-Apr-2017 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Refactor frontend InputKind to prepare for treating module maps as a distinct kind of input.
No functionality change intended.
llvm-svn: 301442
|
#
81503554 |
| 21-Apr-2017 |
David Blaikie <dblaikie@gmail.com> |
Move Split DWARF handling to an MC option/command line argument rather than using metadata
Since Split DWARF needs to name the actual .dwo file that is generated, it can't be known at the time the l
Move Split DWARF handling to an MC option/command line argument rather than using metadata
Since Split DWARF needs to name the actual .dwo file that is generated, it can't be known at the time the llvm::Module is produced as it may be merged with other Modules before the object is generated and that object may be generated with any name.
By passing the Split DWARF file name when LLVM is producing object code the .dwo file name in the object file can match correctly.
The support for Split DWARF for implicit modules remains the same - using metadata to store the dwo name and dwo id so that potentially multiple skeleton CUs referring to different dwo files can be generated from one llvm::Module.
llvm-svn: 301063
show more ...
|
#
1be800c5 |
| 19-Apr-2017 |
Alex Lorenz <arphaman@gmail.com> |
Add support for editor placeholders to Clang
This commit teaches Clang to recognize editor placeholders that are produced when an IDE like Xcode inserts a code-completion result that includes a plac
Add support for editor placeholders to Clang
This commit teaches Clang to recognize editor placeholders that are produced when an IDE like Xcode inserts a code-completion result that includes a placeholder. Now when the lexer sees a placeholder token, it emits an 'editor placeholder in source file' error and creates an identifier token that represents the placeholder. The parser/sema can now recognize the placeholders and can suppress the diagnostics related to the placeholders. This ensures that live issues in an IDE like Xcode won't get spurious diagnostics related to placeholders.
This commit also adds a new compiler option named '-fallow-editor-placeholders' that silences the 'editor placeholder in source file' error. This is useful for an IDE like Xcode as we don't want to display those errors in live issues.
rdar://31581400
Differential Revision: https://reviews.llvm.org/D32081
llvm-svn: 300667
show more ...
|
#
34e485f9 |
| 18-Apr-2017 |
Richard Smith <richard-llvm@metafoo.co.uk> |
[modules-ts] Fold together -x c++ and -x c++-module at -cc1 level.
The driver needs to know whether it's building a module interface or implementation unit because it affects which outputs it produc
[modules-ts] Fold together -x c++ and -x c++-module at -cc1 level.
The driver needs to know whether it's building a module interface or implementation unit because it affects which outputs it produces and how it builds the command pipeline. But the frontend doesn't need to know and should not care: all it needs to know is what action it is being asked to perform on the input.
(This is in preparation for permitting -emit-obj to be used on a module interface unit to produce object code without going via a "full" PCM file.)
llvm-svn: 300611
show more ...
|
#
c69f9f35 |
| 12-Apr-2017 |
Bruno Cardoso Lopes <bruno.cardoso@gmail.com> |
[Modules] Enable local submodule visibility for ObjC/C
Remove the restriction where this is only valid with C++
rdar://problem/29055656
Differential Revision: https://reviews.llvm.org/D31781
llvm
[Modules] Enable local submodule visibility for ObjC/C
Remove the restriction where this is only valid with C++
rdar://problem/29055656
Differential Revision: https://reviews.llvm.org/D31781
llvm-svn: 300108
show more ...
|
#
f63556d8 |
| 12-Apr-2017 |
David Blaikie <dblaikie@gmail.com> |
Modular Codegen: Separate flags for function and debug info support
This allows using and testing these two features separately. (noteably, debug info is, so far as I know, always a win (basically).
Modular Codegen: Separate flags for function and debug info support
This allows using and testing these two features separately. (noteably, debug info is, so far as I know, always a win (basically). But function modular codegen is currently a loss for highly optimized code - where most of the linkonce_odr definitions are optimized away, so providing weak_odr definitions is only overhead)
llvm-svn: 300104
show more ...
|
#
69cdc901 |
| 12-Apr-2017 |
Bruno Cardoso Lopes <bruno.cardoso@gmail.com> |
[Modules] Remove darwin specific code to check for SystemVersion.plist
This isn't need anymore and modules options -fbuild-session-file and -fmodules-validate-once-per-build-session already provide
[Modules] Remove darwin specific code to check for SystemVersion.plist
This isn't need anymore and modules options -fbuild-session-file and -fmodules-validate-once-per-build-session already provide a sane mechanism to validate the system headers.
rdar://problem/19767523
llvm-svn: 300027
show more ...
|
#
e7cdcdea |
| 04-Apr-2017 |
Jin-Gu Kang <jaykang10@gmail.com> |
Preserve vec3 type.
Summary: Preserve vec3 type with CodeGen option.
Reviewers: Anastasia, bruno
Reviewed By: Anastasia
Subscribers: bruno, ahatanak, cfe-commits
Differential Revision: https://r
Preserve vec3 type.
Summary: Preserve vec3 type with CodeGen option.
Reviewers: Anastasia, bruno
Reviewed By: Anastasia
Subscribers: bruno, ahatanak, cfe-commits
Differential Revision: https://reviews.llvm.org/D30810
llvm-svn: 299445
show more ...
|
#
1a3665bb |
| 01-Apr-2017 |
Davide Italiano <davide@freebsd.org> |
[Driver] Don't crash on invalid values of -mrelocation-model=.
This is handled in a similar way we handle invalid -mcode-model.
PR: 31840 llvm-svn: 299315
|
#
504fc226 |
| 30-Mar-2017 |
Dean Michael Berris <dberris@google.com> |
[XRay][clang] Fix the -fxray-instruction-threshold flag processing
Summary: The refactoring introduced a regression in the flag processing for -fxray-instruction-threshold which causes it to not get
[XRay][clang] Fix the -fxray-instruction-threshold flag processing
Summary: The refactoring introduced a regression in the flag processing for -fxray-instruction-threshold which causes it to not get passed properly. This change should restore the previous behaviour.
Reviewers: rnk, pelikan
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D31491
llvm-svn: 299126
show more ...
|