summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Driver: use more range-based for loopsSaleem Abdulrasool2014-06-121-145/+67
| | | | | | | Mechanical change converting some of the simpler for loops into range-based for loops. NFC. llvm-svn: 210738
* clang-cl: accept the /C option with /P (PR19978)Hans Wennborg2014-06-111-3/+7
| | | | | | (It's also allowed with /EP, but we haven't implemented that option yet.) llvm-svn: 210695
* Driver: add -m{,no-}long-calls supportSaleem Abdulrasool2014-06-071-0/+11
| | | | | | | | | | | | | This mirrors the GCC option for the ARM backend. This option enables the backend option "-enable-arm-long-calls". The default behaviour is that this is disabled due to the slight overhead of the generated calls. If the target of jumps are greater than 64M range of offset-based jumps, then the target address must be loaded into a register to make an indirect jump. The backend support for this has been present, but was not previously controllable by the proper flag. llvm-svn: 210398
* Implement -Wframe-larger-than backend diagnosticAlp Toker2014-06-051-0/+7
| | | | | | | | | | | | | | | | | | Add driver and frontend support for the GCC -Wframe-larger-than=bytes warning. This is the first GCC-compatible backend diagnostic built around LLVM's reporting feature. This commit adds infrastructure to perform reverse lookup from mangled names emitted after LLVM IR generation. We use that to resolve precise locations and originating AST functions, lambdas or block declarations to produce seamless codegen-guided diagnostics. An associated change, StringMap now maintains unique mangled name strings instead of allocating copies. This is a net memory saving in C++ and a small hit for C where we no longer reuse IdentifierInfo storage, pending further optimisation. llvm-svn: 210293
* Fix driver warning about -pthread on Android.Evgeniy Stepanov2014-06-051-3/+3
| | | | | | -pthread is no-op on Android. Suppress the unused argument warning. llvm-svn: 210253
* [ubsan] Don't add a --dynamic-list for ubsan symbols when building a sharedRichard Smith2014-06-041-2/+8
| | | | | | | | | library. That results in the linker resolving all references to weak symbols in the DSO to the definition from within that DSO. Ironically, this rarely causes observable problems, except that it causes ubsan's own dynamic type check to spuriously fail (because we fail to properly merge type_info object names). llvm-svn: 210220
* Add flags -Rpass-missed and -Rpass-analysis.Diego Novillo2014-05-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | Summary: These two flags are in the same family as -Rpass, but are used in different situations. -Rpass-missed is used by optimizers to inform the user when they tried to apply an optimization but couldn't (or wouldn't). -Rpass-analysis is used by optimizers to report analysis results back to the user (e.g., why the transformation could not be applied). Depends on D3682. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3683 llvm-svn: 209839
* Make the -mno-global-merge option work for arm64/aarch64. rdar://17024719Bob Wilson2014-05-291-0/+8
| | | | llvm-svn: 209836
* -pthread does not translate to -lpthread on Android.Evgeniy Stepanov2014-05-281-2/+3
| | | | | | | There is no libpthread.so, and pthread interface is implemented in libc.so. This mirrors gcc behavior. llvm-svn: 209731
* AArch64/ARM64: rename ARM64 components to AArch64Tim Northover2014-05-241-13/+21
| | | | | | This keeps Clang consistent with backend naming conventions. llvm-svn: 209579
* AArch64/ARM64: update Clang after AArch64 removal.Tim Northover2014-05-241-22/+0
| | | | | | | | | | | A few (mostly CodeGen) parts of Clang were tightly coupled to the AArch64 backend. Now that it's gone, they will not even compile. I've also deduplicated RUN lines in many of the AArch64 tests. This might improve "make check-all" time noticably: some of those NEON tests were monsters. llvm-svn: 209578
* Don't reduce the stack protector level given -fstack-protector.Rafael Espindola2014-05-221-3/+4
| | | | | | | | | Before -fstack-protector would always force a level of 1, even if the default was 2. Patch by Brad Smith. llvm-svn: 209479
* Unify the name of compiler-rt builtins library on Linux.Alexey Samsonov2014-05-221-3/+4
| | | | | | | | | | Call it "libclang_rt.builtins-<arch>.a" to be consistent with sanitizers/profile libraries naming. Modify Makefile and CMake build systems and Clang driver accordingly. Fixes PR19822. llvm-svn: 209474
* MachO: perform ARM ABI detection even for non-Darwin triples.Tim Northover2014-05-221-1/+1
| | | | | | | | When "-arch armv7m" is specified, we want "aapcs", for example. rdar://problem/16581138 llvm-svn: 209434
* Pass -gdwarf-N options to integrated assemblerOliver Stannard2014-05-191-0/+9
| | | | llvm-svn: 209124
* Driver: force restricted IT blocks for Windows on ARMSaleem Abdulrasool2014-05-181-0/+5
| | | | | | | Windows on ARM expects ARMv8 (restricted IT) conditional instructions only. Force enable the restricted IT mode via the backend option when targeting WoA. llvm-svn: 209086
* [C++11] Use 'nullptr'. Driver edition.Craig Topper2014-05-171-6/+6
| | | | llvm-svn: 209069
* InstrProf: Look for the PIC-version of the profile runtimeDuncan P. N. Exon Smith2014-05-161-1/+8
| | | | | | | | If `-shared` is specified, pull in a PIC-version of the profile runtime, which was added to compiler-rt in r208947. I'm hoping this will get the bots on my side. llvm-svn: 208948
* clang-cl: Fall back immediately if /GR and /fallback were both passedReid Kleckner2014-05-141-1/+9
| | | | | | | None of our tests use /fallback, so this lets us gradually add RTTI support without breaking projects using /fallback. llvm-svn: 208787
* Support -masm= flag for x86 targets.Nico Weber2014-05-131-0/+11
| | | | | | | `clang -S -o - file.c -masm=att` will write assembly to stdout in at&t syntax (the default), `-masm=intel` will instead output intel style asm. llvm-svn: 208683
* [ASan] Fixup for r208610: link in asan_cxx library on WindowsAlexey Samsonov2014-05-121-6/+14
| | | | llvm-svn: 208625
* [ASan] Split static ASan runtime in two parts: asan and asan_cxx.Alexey Samsonov2014-05-121-6/+11
| | | | | | | | | | | asan_cxx containts replacements for new/delete operators, and should only be linked in C++ mode. We plan to start building this part with exception support to make new more standard-compliant. See https://code.google.com/p/address-sanitizer/issues/detail?id=295 for more details. llvm-svn: 208610
* Wrap at 80 columns. No code change.Nico Weber2014-05-111-7/+13
| | | | llvm-svn: 208485
* [mips] Pass nan2008 info to the back-end.Matheus Almeida2014-05-071-1/+7
| | | | | | | | | | | | Summary: The initial support for NaN2008 was added to the back-end in r206396. Reviewers: atanasyan Reviewed By: atanasyan Differential Revision: http://reviews.llvm.org/D3448 llvm-svn: 208220
* Drop libgcc and default to libc++ for NetBSD/ARM on 6.99.40+.Joerg Sonnenberger2014-05-071-1/+5
| | | | | | | Don't bother with keeping the old support for x86_64 in 6.99.23+, just use a single range. Update test cases for the always-on --eh-frame-hdr. llvm-svn: 208170
* [PATCH] [ARM64] Enable alignment control option in front-end for ARM64.Kevin Qin2014-05-061-2/+10
| | | | | | | This patch is to get "-mno-unaligned-access" and "-munaligned-access" work in front-end for ARM64 target. llvm-svn: 208075
* Simplify getARMCPUForMArch() and make it more consistentChristian Pirker2014-05-051-53/+39
| | | | llvm-svn: 207956
* [driver] Enable the slp vectorizer at -Oz.Chad Rosier2014-05-021-6/+8
| | | | | | PR19568 llvm-svn: 207858
* [ARM64/AArch64] Hook up CRC32 subtarget feature to the driverBradley Smith2014-05-021-0/+9
| | | | llvm-svn: 207841
* XCore target: fix handling of -g0 flagRobert Lytton2014-05-021-2/+3
| | | | llvm-svn: 207833
* Android uses -fpic for arm64 as well.Logan Chien2014-04-301-0/+1
| | | | llvm-svn: 207642
* Drop non-cfi assembly support from clang.Rafael Espindola2014-04-301-16/+0
| | | | | | | | | | | | | | After this patch clang will ignore -fdwarf2-cfi-asm and -ffno-dwarf2-cfi-asm and always print assembly that uses cfi directives. In llvm, MC itself supports cfi since the end of 2010 (support started in r119972, is reported in the 2.9 release notes). In binutils the support has been around for much longer. It looks like support started to be added in May 2003. It is available in 2.15 (31-Aug-2011, 2.14 is from 12-Jun-2003). llvm-svn: 207602
* Android uses -fpic for aarch64.Logan Chien2014-04-291-0/+1
| | | | llvm-svn: 207567
* Add comments regarding isPIEDefault usage for r207520Alexey Volkov2014-04-291-0/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D2668 llvm-svn: 207521
* Pass -pie to linker when generating executable on AndroidAlexey Volkov2014-04-291-1/+4
| | | | | | | | This fixes problem with LTO on Android. Differential Revision: http://reviews.llvm.org/D2668 llvm-svn: 207520
* [driver] Disable the slp vectorizer at -O0, -O1, and -Oz. This mirrors theChad Rosier2014-04-281-3/+5
| | | | | | | | behavior of the loop vectorizer, which is enabled at -O2, -O3, -O4, -Ofast and -Os. PR19568 llvm-svn: 207433
* clang-cl: /fallback only applies to C or C++ filesHans Wennborg2014-04-251-1/+2
| | | | | | We would previously hit an assert if using /fallback with an .ll file. llvm-svn: 207234
* clang-cl: pass -debug flag to the linker when compiling with debug infoHans Wennborg2014-04-251-0/+4
| | | | llvm-svn: 207233
* [ARM64] Plumb in big-endian - add arm64_be to the many switches where it was ↵James Molloy2014-04-171-2/+7
| | | | | | missing. llvm-svn: 206462
* [ARM64] Default to the 'generic' CPU, unless -arch is present for backwards ↵James Molloy2014-04-171-2/+6
| | | | | | compatibility. llvm-svn: 206461
* Add support for optimization reports.Diego Novillo2014-04-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds a new flag -Rpass=. The flag indicates the name of the optimization pass that should emit remarks stating when it made a transformation to the code. This implements the design I proposed in: https://docs.google.com/document/d/1FYUatSjZZO-zmFBxjOiuOzAy9mhHA8hqdvklZv68WuQ/edit?usp=sharing Other changes: - Add DiagnosticIDs::isRemark(). Use it in printDiagnosticOptions to print "-R" instead of "-W" in the diagnostic message. - In BackendConsumer::OptimizationRemarkHandler, get a SourceLocation object out of the file name, line and column number. Use that location in the call to Diags.Report(). - When -Rpass is used without debug info a note is emitted alerting the user that they need to use -gline-tables-only -gcolumn-info to get this information. CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3226 llvm-svn: 206401
* [ARM64] Plumb in the -mfpu= flag.James Molloy2014-04-161-0/+2
| | | | llvm-svn: 206395
* [Driver][ARM64] Make sure the default CPU is passed to the assembler.Quentin Colombet2014-04-151-0/+3
| | | | | | <rdar://problem/16573920> llvm-svn: 206227
* Add -fmodules-strict-decluse to check that all headers are in modulesDaniel Jasper2014-04-111-0/+8
| | | | | Review: http://reviews.llvm.org/D3335 llvm-svn: 206027
* clang-cl: Disable TBAA by default for MSVC compatibilityReid Kleckner2014-04-091-1/+4
| | | | | | | MSVC doesn't have an option to enable TBAA, so make -fstrict-aliasing and -fno-strict-aliasing available in clang-cl. llvm-svn: 205924
* Fix a typo introduced in r205716David Majnemer2014-04-071-3/+2
| | | | llvm-svn: 205717
* clang-cl: make /Gw map to -fdata-sectionsDavid Majnemer2014-04-071-6/+5
| | | | | | Note that /Gy no longer implies -fdata-sections. llvm-svn: 205716
* Driver: add target definition for Windows on ARMSaleem Abdulrasool2014-04-041-1/+30
| | | | | | | | | This introduces the definitions needed for the Windows on ARM target. Add target definitions for both the MSVC environment and the MSVC + Itanium C++ ABI environment. The Visual Studio definitions correspond to the definitions provided by Visual Studio 2012. llvm-svn: 205650
* Code cleanup (re-indent)Logan Chien2014-04-031-7/+7
| | | | llvm-svn: 205536
* Add support for dynamic ASan runtime (on Linux) to Clang driver.Alexey Samsonov2014-04-011-24/+47
| | | | | | Based on http://llvm-reviews.chandlerc.com/D3043 by Yuri Gribov! llvm-svn: 205310
OpenPOWER on IntegriCloud