summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [clang][Driver][ARM] Favor -mfpu over default CPU featuresAlexandros Lamprineas2019-07-142-2/+6
| | | | | | | | | | | | | | | | When processing the command line options march, mcpu and mfpu, we store the implied target features on a vector. The change D62998 introduced a temporary vector, where the processed features get accumulated. When calling DecodeARMFeaturesFromCPU, which sets the default features for the specified CPU, we certainly don't want to override the features that have been explicitly specified on the command line. Therefore, the default features should appear first in the final vector. This problem became evident once I added the missing (unhandled) target features in ARM::getExtensionFeatures. Differential Revision: https://reviews.llvm.org/D63936 llvm-svn: 366027
* consistency in the release notesSylvestre Ledru2019-07-141-2/+2
| | | | llvm-svn: 366024
* [Driver] Simplify AddLibgccFangrui Song2019-07-141-9/+3
| | | | llvm-svn: 366013
* [Driver] Simplify -lgcc & -lgcc_sFangrui Song2019-07-141-17/+13
| | | | | | | gcc defaults to -shared-libgcc in C++ mode. Letting getLibGccType() return SharedLibGcc simplifies the logic. llvm-svn: 366012
* Remove extra ';' to silent compiler warning.Michael Liao2019-07-131-2/+3
| | | | | | - Plus extra style formatting. llvm-svn: 366010
* Template-related improvements to Visual Studio visualizersMike Spertus2019-07-131-7/+48
| | | | llvm-svn: 366007
* Fix -Wdocumentation warning. NFCI.Simon Pilgrim2019-07-131-2/+1
| | | | llvm-svn: 365995
* [CMake][Fuchsia] Define asan+noexcept multilibPetr Hosek2019-07-135-2/+16
| | | | | | | | | | | | | | | | | | Using noexcept multilib with -fno-exceptions can lead to significant space savings when statically linking libc++abi because we don't need all the unwinding and demangling code. When compiling with ASan, we already get a lot of overhead from the instrumentation itself, when statically linking libc++abi, that overhead is even larger. Having the noexcept variant for ASan can help significantly, we've seen more than 50% size reduction in our system image, which offsets the cost of having to build another multilib. Differential Revision: https://reviews.llvm.org/D64140 llvm-svn: 365994
* This reverts commit 632a36bfcfc8273c1861f04ff6758d863c47c784.Sylvestre Ledru2019-07-137-12/+15
| | | | | | | | | | | | Some targets such as Python 2.7.16 still use VERSION in their builds. Without VERSION defined, the source code has syntax errors. Reverting as it will probably break many other things. Noticed by Sterling Augustine llvm-svn: 365992
* Initialize the non-trivial C union bits I added to RecordDeclBitfieldsAkira Hatanaka2019-07-131-0/+3
| | | | | | | | | | in r365985 These bits weren't being initialized in the RecordDecl's constructor, which probably caused test/Modules/stress1.cpp to fail on a couple of bots. llvm-svn: 365989
* [Sema] Diagnose default-initialization, destruction, and copying ofAkira Hatanaka2019-07-1317-122/+611
| | | | | | | | | | | | | | | | | | | | | | | | | | | non-trivial C union types This patch diagnoses uses of non-trivial C unions and structs/unions containing non-trivial C unions in the following contexts, which require default-initialization, destruction, or copying of the union objects, instead of disallowing fields of non-trivial types in C unions, which is what we currently do: - function parameters. - function returns. - assignments. - compound literals. - block captures except capturing of `__block` variables by non-escaping blocks. - local and global variable definitions. - lvalue-to-rvalue conversions of volatile types. See the discussion in https://reviews.llvm.org/D62988 for more background. rdar://problem/50679094 Differential Revision: https://reviews.llvm.org/D63753 llvm-svn: 365985
* clang/test/Driver/fsanitize.c: Fix -fsanitize=vptr using default targetFangrui Song2019-07-131-1/+1
| | | | | | | | | | | | The default implementation of getSupportedSanitizers isn't able to turn on the vptr sanitizer, and thus, any platform that runs this test will fail with the error: clang: error: unsupported option '-fsanitize=vptr' for target '<target>' Patch by James Nagurne! llvm-svn: 365981
* [DirectoryWatcher][test][NFC] Add information to test failure reportsJan Korous2019-07-131-2/+25
| | | | llvm-svn: 365976
* Re-land [JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from ↵Sam McCall2019-07-122-4/+73
| | | | | | | | parsed commands. Use //net/dir like other test cases for windows compatibility llvm-svn: 365975
* NFC: utils/perf-training: Python 3 compatibility for lit.cfgAlex Lorenz2019-07-121-1/+1
| | | | | | The output of subprocess.check_output is now bytes. We need to decode it. llvm-svn: 365969
* [DirectoryWatcher][NFC] Silence warnings in release buildJan Korous2019-07-122-4/+14
| | | | llvm-svn: 365968
* [DirectoryWatcher][linux] Fix use of uninitialized valueJan Korous2019-07-121-2/+2
| | | | llvm-svn: 365966
* Remove __VERSION__Sylvestre Ledru2019-07-127-15/+12
| | | | | | | | | | | | | | | | | | | | Summary: It has been introduced in 2011 for gcc compat: https://github.com/llvm-mirror/clang/commit/ad1a4c6e89594e704775ddb6b036ac982fd68cad it is probably time to remove it Reviewers: rnk, dexonsmith Reviewed By: rnk Subscribers: dschuff, aheejin, fedor.sergeev, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64062 llvm-svn: 365962
* Revert driver: Don't warn about assembler flags being unused when not assemblingReid Kleckner2019-07-122-35/+0
| | | | | | | | | | | This reverts r365703 (git commit 101c1afdfd1c88f05da94c6fd317b489bb704f40) and r365714. This broke some autoconf-style assembler flags checks in the Linux build: https://github.com/ClangBuiltLinux/linux/issues/598 llvm-svn: 365956
* Reland [clang] DirectoryWatcherJan Korous2019-07-1211-0/+1277
| | | | | | | | | | This reverts commit f561227d133224d2d6a5a016abe4be051fa75501. - DirectoryWatcher - Fix the build for platforms that don't have DW implementated. - Fix the threading dependencies (thanks to compnerd). llvm-svn: 365954
* Revert "Reland [clang] DirectoryWatcher"Jan Korous2019-07-1211-1277/+0
| | | | | | This reverts commit fdcb7f47e783933e0af8a5fae91132269a208268. llvm-svn: 365948
* Reland [clang] DirectoryWatcherJan Korous2019-07-1211-0/+1277
| | | | | | | | This reverts commit abce8c457dd3de6b156756e547cc0eefb7653c79. + Fix the build for platforms that don't have DW implementated. llvm-svn: 365947
* [WebAssembly] Make pthread imply bulk-memory, mutable-globalsThomas Lively2019-07-122-3/+29
| | | | | | | | | | | | | | | | | Summary: This paves the way for using passive segments in pthread builds, which will make separate memory files unnecessary. Mutable globals are also necessary for the upcoming implementation of TLS. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, jfb, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64586 llvm-svn: 365935
* [SystemZ] Add support for new cpu architecture - arch13Ulrich Weigand2019-07-1218-4/+1214
| | | | | | | | | | | | | | | | | This patch series adds support for the next-generation arch13 CPU architecture to the SystemZ backend. This includes: - Basic support for the new processor and its features. - Support for low-level builtins mapped to new LLVM intrinsics. - New high-level intrinsics in vecintrin.h. - Indicate support by defining __VEC__ == 10303. Note: No currently available Z system supports the arch13 architecture. Once new systems become available, the official system name will be added as supported -march name. llvm-svn: 365933
* Revert [clang-shlib] Fix clang-shlib for PRIVATE dependenciesShoaib Meenai2019-07-121-29/+2
| | | | | | | | This reverts r365825 (git commit 3173c60f96c3ccfc17d403a192ae58e720153c23) This is breaking BUILD_SHARED_LIBS=ON builds. Reverting while I rethink it. llvm-svn: 365922
* CodeGet: Init 32bit pointers with 0xFFFFFFFFVitaly Buka2019-07-122-19/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Patch makes D63967 effective for 32bit platforms and improves pattern initialization there. It cuts size of 32bit binary compiled with -ftrivial-auto-var-init=pattern by 2% (3% with -Os). Binary size change on CTMark, (with -fuse-ld=lld -Wl,--icf=all, similar results with default linker options) ``` master patch diff Os pattern 7.915580e+05 7.698424e+05 -0.028387 O3 pattern 9.953688e+05 9.752952e+05 -0.019325 ``` Zero vs Pattern on master ``` zero pattern diff Os 7.689712e+05 7.915580e+05 0.031380 O3 9.744796e+05 9.953688e+05 0.021133 ``` Zero vs Pattern with the patch ``` zero pattern diff Os 7.689712e+05 7.698424e+05 0.000789 O3 9.744796e+05 9.752952e+05 0.000742 ``` Reviewers: pcc, eugenis, glider, jfb Reviewed By: jfb Subscribers: hubert.reinterpretcast, dexonsmith, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64597 llvm-svn: 365921
* Dump actual line numbers when dumping the AST to JSON.Aaron Ballman2019-07-123-13/+169
| | | | | | The "line" attribute is now the physical line within the source file for the location. A "presumedLine" attribute is printed when the presumed line number does not match the given source line number. We continue to not print repeated line information in subsequent source locations, but we track presumed and actual lines separately. llvm-svn: 365919
* [clang-format][tests] Explicitly specify style in some testsRafael Stahl2019-07-124-5/+5
| | | | | | | | | | | | | | | | Summary: This fixes broken tests when doing an out-of-source build that picks up a random .clang-format on the file system due to the default "file" style. Reviewers: djasper, klimek, MyDeveloperDay, krasimir Reviewed By: MyDeveloperDay Subscribers: lebedev.ri, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61001 llvm-svn: 365909
* Revert "[JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from ↵Russell Gallop2019-07-122-70/+4
| | | | | | | | | | parsed commands." New test is failing on Windows bot This reverts commit 9c0391b36a76f8e3949588de3f44b7314c2318bf. llvm-svn: 365906
* cmake: Fix install of libclang-cpp.so when LLVM_INSTALL_TOOLCHAIN_ONLY=ONTom Stellard2019-07-121-0/+5
| | | | | | | | | | | | | | | | | | | | | Summary: If CLANG_LINK_CLANG_DYLIB is also enabled, then this library needs to be installed. Fixes PR42575. Reviewers: beanz, smeenai Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64582 Conflicts: clang/tools/clang-shlib/CMakeLists.txt llvm-svn: 365905
* cmake: Add INSTALL_WITH_TOOLCHAIN option to add_*_library macrosTom Stellard2019-07-122-3/+3
| | | | | | | | | | | | | | | | | | | Summary: This will simplify the macros by allowing us to remove the hard-coded list of libraries that should be installed when LLVM_INSTALL_TOOLCHAIN_ONLY is enabled. Reviewers: beanz, smeenai Reviewed By: beanz Subscribers: aheejin, mehdi_amini, mgorny, steven_wu, dexonsmith, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D64580 llvm-svn: 365902
* Delete dead storesFangrui Song2019-07-124-6/+2
| | | | llvm-svn: 365901
* Dump floating-point values as strings when dumping to JSON.Aaron Ballman2019-07-123-5063/+5086
| | | | | | This fixes a bug where we would have an invalid JSON attribute (e.g., "value": inf). It also increases the precision of the values because they're not represented as approximate doubles with the host architecture's floating-point model. llvm-svn: 365900
* [Driver] Delete dead codeFangrui Song2019-07-122-7/+1
| | | | llvm-svn: 365898
* [JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed ↵Sam McCall2019-07-122-4/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commands. Summary: It's common to use compiler wrappers by setting CC="gomacc clang++". This results in both args appearing in compile_commands.json, and clang's driver can't handle this. This patch attempts to recognize this pattern (by looking for well-known wrappers) and dropping argv0 in this case. It conservatively ignores other cases for now: - wrappers with unknown names - wrappers that accept -flags - wrappers where the compiler to use is implied (usually cc or gcc) This is done at the JSONCompilationDatabase level rather than somewhere more fundamental, as (hopefully) this isn't a general conceptual problem, but a messy aspect of the nature of the ecosystem around compile_commands.json. i.e. compilation databases more tightly tied to the build system should not have this problem. Reviewers: phosek, klimek Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64297 llvm-svn: 365887
* [Driver] Delete --no-add-needed for RHEL7 or newerFangrui Song2019-07-121-3/+0
| | | | | | | | This is really not needed. gcc driver doesn't add this option. BTW, since binutils 2.22, --no-copy-dt-needed-entries (new name of --no-add-needed) is the default. llvm-svn: 365877
* [test] Delete trailing spaces from YAML testsFangrui Song2019-07-124-16/+16
| | | | llvm-svn: 365873
* test/Driver/fsanitize.c: delete -target x86_64-linux-gnu from tests that ↵Fangrui Song2019-07-121-21/+21
| | | | | | | | should always be available Follow-up of D64317/r365587. llvm-svn: 365872
* [X86][PowerPC] Support -mlong-double-128Fangrui Song2019-07-129-12/+52
| | | | | | | | | | | | | | | This patch makes the driver option -mlong-double-128 available for X86 and PowerPC. The CC1 option -mlong-double-128 is available on all targets for users to test on unsupported targets. On PowerPC, -mlong-double-128 uses the IBM extended double format because we don't support -mabi=ieeelongdouble yet (D64283). Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D64277 llvm-svn: 365866
* NFC: Unforget a colon in a few CHECK: directives.Artem Dergachev2019-07-123-3/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D64526 llvm-svn: 365863
* [PowerPC] Default to -fomit-frame-pointer when optimization is enabledFangrui Song2019-07-122-3/+8
| | | | | | | NetBSD, Linux, CloudABI and Hurd already omit frame pointer for PowerPC. Make it do so for other platforms. llvm-svn: 365862
* [analyzer] exploded-graph-rewriter: Improve source location dumps.Artem Dergachev2019-07-1210-65/+134
| | | | | | | | - Correctly display macro expansion and spelling locations. - Use the same procedure to display location context call site locations. - Display statement IDs for program points. llvm-svn: 365861
* [Driver] Refactor interaction between -f(no-)?omit-frame-pointer and ↵Fangrui Song2019-07-125-69/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -m(no-)?omit-leaf-frame-pointer Use a tri-state enum to represent shouldUseFramePointer() and shouldUseLeafFramePointer(). This simplifies the logic and fixes PR9825: -fno-omit-frame-pointer doesn't imply -mno-omit-leaf-frame-pointer. and PR24003: /Oy- /O2 should not omit leaf frame pointer: this matches MSVC x86-32. (/Oy- is a no-op on MSVC x86-64.) and: when CC1 option -mdisable-fp-elim if absent, -momit-leaf-frame-pointer can also be omitted. The new behavior matches GCC: -fomit-frame-pointer wins over -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer loses out to -momit-leaf-frame-pointer The behavior makes lots of sense. We have 4 states: - 00) leaf retained, non-leaf retained - 01) leaf retained, non-leaf omitted (this is invalid) - 10) leaf omitted, non-leaf retained (what -momit-leaf-frame-pointer was designed for) - 11) leaf omitted, non-leaf omitted "omit" options taking precedence over "no-omit" options is the only way to make 3 valid states representable with -f(no-)?omit-frame-pointer and -m(no-)?omit-leaf-pointer. Reviewed By: ychen Differential Revision: https://reviews.llvm.org/D64294 llvm-svn: 365860
* Handle IntToPtr in isBytewiseValueVitaly Buka2019-07-121-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This helps with more efficient use of memset for pattern initialization From @pcc prototype for -ftrivial-auto-var-init=pattern optimizations Binary size change on CTMark, (with -fuse-ld=lld -Wl,--icf=all, similar results with default linker options) ``` master patch diff Os 8.238864e+05 8.238864e+05 0.0 O3 1.054797e+06 1.054797e+06 0.0 Os zero 8.292384e+05 8.292384e+05 0.0 O3 zero 1.062626e+06 1.062626e+06 0.0 Os pattern 8.579712e+05 8.338048e+05 -0.030299 O3 pattern 1.090502e+06 1.067574e+06 -0.020481 ``` Zero vs Pattern on master ``` zero pattern diff Os 8.292384e+05 8.579712e+05 0.036578 O3 1.062626e+06 1.090502e+06 0.025124 ``` Zero vs Pattern with the patch ``` zero pattern diff Os 8.292384e+05 8.338048e+05 0.003333 O3 1.062626e+06 1.067574e+06 0.003193 ``` Reviewers: pcc, eugenis Subscribers: hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D63967 llvm-svn: 365858
* Codegen, NFC: 32bit test in auto-var-init.cppVitaly Buka2019-07-121-115/+107
| | | | llvm-svn: 365857
* Re-Revert Devirtualize destructor of final class.Jordan Rupprecht2019-07-122-50/+3
| | | | | | | | | | This reverts r365509 (git commit d088720edad9c29ee0d622b5d69092e18a9ac0bd) This is a second revert[1] due to failures in internal test cases (shared offline) found during more thorough testing. [1] Original patch commited as r364100, reverted as r364359, recommitted as r365509 llvm-svn: 365850
* [CMake][Fuchsia] Use RelWithDebInfo to build runtimesPetr Hosek2019-07-111-4/+4
| | | | | | | | | | | | We want to preserve debug info in our runtimes to aid symbolization and debugging; for shared libraries this will be stripped away during install-stripped step and distributed via .build-id, for static archives it's part of the archive and it's a responsibility of the consumer to strip it away in the final binary if not needed. Differential Revision: https://reviews.llvm.org/D64605 llvm-svn: 365845
* [NewPM] Port SancovLeonard Chan2019-07-112-7/+81
| | | | | | | | | | | | | | | | | This patch contains a port of SanitizerCoverage to the new pass manager. This one's a bit hefty. Changes: - Split SanitizerCoverageModule into 2 SanitizerCoverage for passing over functions and ModuleSanitizerCoverage for passing over modules. - ModuleSanitizerCoverage exists for adding 2 module level calls to initialization functions but only if there's a function that was instrumented by sancov. - Added legacy and new PM wrapper classes that own instances of the 2 new classes. - Update llvm tests and add clang tests. Differential Revision: https://reviews.llvm.org/D62888 llvm-svn: 365838
* CodeGen: Suppress c++ warnings in testVitaly Buka2019-07-111-0/+2
| | | | llvm-svn: 365835
* Fix a Python3 compatibility errorAzharuddin Mohammed2019-07-111-1/+1
| | | | | | | | File "clang/test/lit.cfg.py", line 186, in <module> config.available_features.add('macos-sdk-' + macOSSDKVersion) TypeError: must be str, not bytes llvm-svn: 365832
OpenPOWER on IntegriCloud