summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove bad test.Sean Silva2015-07-302-15/+0
| | | | | | | | | | | | | We currently don't canonicalize paths in the preprocessed files. But we do when writing to PCH. This causes a discrepancy on Windows with the test below. This test fails even on unix if you change the test to use `%S//preprocess.h`. I am led to conclude that the invariant that this test was intending to test has not been upheld for a while (and may never have been). llvm-svn: 243602
* [sanitizer] add a weak hook for memcmp interceptor, to be used primarily for ↵Kostya Serebryany2015-07-303-0/+29
| | | | | | fuzzing. More hooks will be added later. So far this is a Linux-only feature llvm-svn: 243601
* Attempt to make clang-x64-ninja-win7 happy.Sean Silva2015-07-302-7/+9
| | | | | | | It looks like we were somehow relying somewhere on removing 'foo/./bar' but *not* 'foo/../foo/bar'. Currently investigating. llvm-svn: 243600
* [Sanitizer] Replace diagnostic string literal to workaround CMake 2.8 bug.Alexey Samsonov2015-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Let me tell you a story. Suppose you want to build your project (e.g. LLVM) with CMake 2.8, Clang and AddressSanitizer. You also want to ensure that Clang is fresh enough and check that CMAKE_CXX_COMPILER_VERSION is 3.1+. This check would fail - CMake would fail to correctly calculate compiler version if you pass CMAKE_CXX_FLAGS=-fsanitize=address. The problem is funky compiler version calculation in CMakeDetermineCompilerId.cmake module: it compiles the sample source file with provided compiler and compile flags, runs "strings" and greps for "INFO:" ASCII strings contained on the executable to fetch "INFO:compiler", "INFO:compiler_version" etc. It limits the output of grep to just 4 lines. Unfortunately, if your executable was built with ASan, it would also contain an ASCII string INFO: %s ignores mlock/mlockall/munlock/munlockall and INFO:compiler_version string would never be parsed. All of the above actually happened after r243574 when we tried to configure libcxx with just-built Clang with TSan/MSan, and the version check mentioned above failed in HandleLLVMOptions.cmake (╯°□°)╯.~.┻━┻ llvm-svn: 243599
* Prefix make_reverse_iterator with llvm namespace.Pete Cooper2015-07-301-4/+4
| | | | | | | | This was fallout from r243581. Turns out C++14 has make_reverse_iterator. Thanks to Filipe and David for the quick fix suggestion. llvm-svn: 243598
* Avoid failure to canonicalize '..'.Sean Silva2015-07-304-8/+25
| | | | | | | | | | | | | | Also fix completely broken and untested code which was hiding the primary bug. The !LLVM_ON_UNIX branch of the ifdef was actually a no-op. I ran into this in the wild. It was causing failures in our SDK build. Ideally we'd have a perfect llvm::sys::fs::canonical, but at least this is a step in the right direction, and fixes an obviously broken case. In some sense the test case I've added here is an integration test. We should have these routines thoroughly unit tested in llvm::sys::fs. llvm-svn: 243597
* push fast-math check for machine-combiner reassociations into ↵Sanjay Patel2015-07-301-7/+4
| | | | | | | | instruction-type check; NFC This makes it simpler to add instruction types that don't depend on fast-math. llvm-svn: 243596
* [asan,tsan,msan] move the memcmp interceptor from asan/tsan to ↵Kostya Serebryany2015-07-298-54/+101
| | | | | | sanitizer_common. This may potentially lead to more reports from msan as it now sees the reads inside memcmp. To disable, use the flag intercept_memcmp=0. Likewise, it may potentially cause new races to appear due to more strict memcmp checking (flag strict_memcmp=1) llvm-svn: 243595
* Fix -Wredundant-move warning.Richard Trieu2015-07-293-113/+19
| | | | | | | | | Without DR1579 implemented, the only case for -Wredundant-move is for a parameter being returned with the same type as the function return type. Also include a check to verify that the move constructor will be used by matching nodes in the AST dump. llvm-svn: 243594
* Revert recent CMake changes again due to failing compiler-rt buildsEric Fiselier2015-07-299-464/+382
| | | | llvm-svn: 243593
* [modules] When performing redeclaration lookup for a using declaration, preferRichard Smith2015-07-297-26/+85
| | | | | | | | | | UsingShadowDecls over other declarations of the same entity in the lookup results. This ensures that we build correct redeclaration chains for the UsingShadowDecls (otherwise we could see assertions and other misbehavior in modules builds, when merging combines multiple redeclaration chains for the same entity from the same module into one chain). llvm-svn: 243592
* Attempt to fix build issues introduced by Eric Fiselier2015-07-292-31/+38
| | | | | | r243574 llvm-svn: 243591
* IR: Implement Value::mergeUseLists() iterativelyMatthias Braun2015-07-291-20/+22
| | | | | | | | | | | | This avoids stack overflows when the the compiler does not perform tail call elimination. Apparently this happens for MSVC with the /Ob2 switch which may be used by external code including this header. Reported by and based on a patch from Jean-Francois Riendeau. Related to rdar://21900756 llvm-svn: 243590
* [MCJIT] Fix PR20656 by teaching MCJIT to honor ExecutionEngine's global mapping.Lang Hames2015-07-293-2/+48
| | | | | | | This is important for users of the C API who can't supply custom symbol resolvers yet. llvm-svn: 243589
* Remove unused #includes.Rui Ueyama2015-07-292-3/+0
| | | | llvm-svn: 243588
* COFF: Suppress "Duplicate entry" warning of lib.exeRui Ueyama2015-07-291-3/+2
| | | | | | | | | | | | | | | | | We create a module-definition file and give that to lib.exe to create an import library file. A module-definition has to be syntactically and semantically correct, of course. There was a case that we created a module-definition file that lib.exe would complain for duplicate entries. If a user gives an unmangled and mangled name for the same symbol, we would end up having two duplicate lines for the mangled name in a module- definition file. This patch fixes that issue by uniquefying entries by mangled symbol name. llvm-svn: 243587
* Fix typo in unused variable name.Nick Lewycky2015-07-291-1/+1
| | | | llvm-svn: 243586
* Fix typo "fuction" noticed in comments in AssumptionCache.h, and also all ↵Nick Lewycky2015-07-2917-18/+18
| | | | | | | | the other files that have the same typo. All comments, no functionality change! (Merely a "fuctionality" change.) Bonus change to remove emacs major mode marker from SystemZMachineFunctionInfo.cpp because emacs already knows it's C++ from the extension. Also fix typo "appeary" in AMDGPUMCAsmInfo.h. llvm-svn: 243585
* [dsymutil] Re-add command line option -v this time printing the version.Frederic Riss2015-07-291-0/+6
| | | | llvm-svn: 243584
* [dsymutil] Use option categories.Frederic Riss2015-07-291-9/+22
| | | | | | | | Prevent all the unrelated LLVM options to appear in the -help output by introducing a tool specific option category. As a drive-by improve the wording of the help message. llvm-svn: 243583
* [dsymutil] Rename -v option to -verboseFrederic Riss2015-07-295-11/+11
| | | | | | | | | | | | The dsymutil-classic -v option dumps the tool version rather than putting it in verbose mode. Rename -v to -verbose and update the tests that use it (in the process removing it from a few tests that didn't require it anymore since the -dump-debug-map option was introduced). A followup commit will reintroduce the -v option that dumps the version. llvm-svn: 243582
* Reapply "Add reverse(ContainerTy) range adapter."Pete Cooper2015-07-294-2/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit r243567, which ultimately reapplies r243563. The fix here was to use std::enable_if for overload resolution. Thanks to David Blaikie for lots of help on this, and for the extra tests! Original commit message follows: For cases where we needed a foreach loop in reverse over a container, we had to do something like for (const GlobalValue *GV : make_range(TypeInfos.rbegin(), TypeInfos.rend())) { This provides a convenience method which shortens this to for (const GlobalValue *GV : reverse(TypeInfos)) { There are 2 versions of this, with a preference to the rbegin() version. The first uses rbegin() and rend() to construct an iterator_range. The second constructs an iterator_range from the begin() and end() methods wrapped in std::reverse_iterator's. Reviewed by David Blaikie. llvm-svn: 243581
* Make DWARF at_comp_dir symbolic links configurable via ↵Oleksiy Vyalov2015-07-298-14/+238
| | | | | | | | plugin.symbol-file.dwarf.comp-dir-symlink-paths setting. http://reviews.llvm.org/D11586 llvm-svn: 243580
* [ELF2] Templatize addChunk and handle section flags.Michael J. Spencer2015-07-293-6/+20
| | | | llvm-svn: 243579
* Rename hasCompatibleFunctionAttributes->areInlineCompatible basedEric Christopher2015-07-296-17/+17
| | | | | | | on suggestions. Currently the function is only used for inline purposes and this is more descriptive for the use. llvm-svn: 243578
* [X86][SSE] Keep 32-bit target i64 vector shifts on SSE unit.Simon Pilgrim2015-07-294-39/+43
| | | | | | | | This patch improves the 32-bit target i64 constant matching to detect the shuffle vector splats that are introduced by i64 vector shift vectorization (D8416). Differential Revision: http://reviews.llvm.org/D11327 llvm-svn: 243577
* AArch64: use 32-bit MOV rather than UBFX to truncate registers.Tim Northover2015-07-295-18/+18
| | | | | | | | | It's potentially more efficient on Cyclone, and from the optimization guides & schedulers looks like it has no effect on Cortex-A53 or A57. In general you'd expect a MOV to be about the most efficient instruction with its semantics, even though the official "UXTW" alias is really a UBFX. llvm-svn: 243576
* MIR Serialization: Serialize the frame info's save and restore points.Alex Lorenz2015-07-294-9/+111
| | | | | | | This commit serializes the save and restore machine basic block references from the machine frame information class. llvm-svn: 243575
* Recommit r243503 "[libcxx] Cleanup CMake configuration and integrate with LLVM"Eric Fiselier2015-07-299-382/+457
| | | | | | | | | This change was reverted in r243550 because it broke clang-format builds (see PR24306). This patch recommits a fixed version of the original. llvm-svn: 243574
* COFF: Fix command line option spelling.Rui Ueyama2015-07-292-2/+2
| | | | llvm-svn: 243573
* MIR Parser: Extract the code that parses MBB references into a new method. NFC.Alex Lorenz2015-07-291-5/+18
| | | | | | | This commit extracts the code that's used by the class 'MIRParserImpl' to parse the machine basic block references into a new method named 'parseMBBReference'. llvm-svn: 243572
* [SemaAccess] Provide meaningful message when we hit llvm_unreachable().Davide Italiano2015-07-291-1/+1
| | | | llvm-svn: 243571
* Remove astyle-options.Rui Ueyama2015-07-291-7/+0
| | | | | | | We have our own code formatting tool, clang-format. I believe no one is using "astyle" to format the code. llvm-svn: 243570
* [X86][SSE] Vectorize i64 ASHR operationsSimon Pilgrim2015-07-296-352/+221
| | | | | | | | This patch vectorizes the v2i64/v4i64 ASHR shift operations - the last remaining integer vector shifts that are still being transferred to/from the scalar unit to be completed. Differential Revision: http://reviews.llvm.org/D11439 llvm-svn: 243569
* COFF: Ignore /ThrowNew command line option.Rui Ueyama2015-07-292-0/+3
| | | | | | | This command line option is added since MSVC 2015. Our wild guess is that the flag is for LTCG and we can safely ignore that. llvm-svn: 243568
* Revert "Add reverse(ContainerTy) range adapter."Pete Cooper2015-07-294-103/+2
| | | | | | | | | This reverts commit r243563. The GCC buildbots were extremely unhappy about this. Reverting while we discuss a better way of doing overload resolution. llvm-svn: 243567
* [opaque pointers] Remove use of PointerType::getElementType in favor of ↵David Blaikie2015-07-291-4/+1
| | | | | | GEPOperator::getSourceElementType llvm-svn: 243566
* COFF: Add /safeseh command line option.Rui Ueyama2015-07-292-0/+62
| | | | | | If /safeseh is specified, all input files must be compatible with Safe SEH. llvm-svn: 243565
* [asan] XFAIL 1 test on Android.Evgeniy Stepanov2015-07-291-0/+1
| | | | | | | The test uses source file relative paths which does not work when the test is executed on a remote device. llvm-svn: 243564
* Add reverse(ContainerTy) range adapter.Pete Cooper2015-07-294-2/+103
| | | | | | | | | | | | | | | | | | | | | | | For cases where we needed a foreach loop in reverse over a container, we had to do something like for (const GlobalValue *GV : make_range(TypeInfos.rbegin(), TypeInfos.rend())) { This provides a convenience method which shortens this to for (const GlobalValue *GV : reverse(TypeInfos)) { There are 2 versions of this, with a preference to the rbegin() version. The first uses rbegin() and rend() to construct an iterator_range. The second constructs an iterator_range from the begin() and end() methods wrapped in std::reverse_iterator's. Reviewed by David Blaikie. llvm-svn: 243563
* [ASan] Disable dynamic alloca and UAR detection in presence of returns_twice ↵Alexey Samsonov2015-07-292-9/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | calls. Summary: returns_twice (most importantly, setjmp) functions are optimization-hostile: if local variable is promoted to register, and is changed between setjmp() and longjmp() calls, this update will be undone. This is the reason why "man setjmp" advises to mark all these locals as "volatile". This can not be enough for ASan, though: when it replaces static alloca with dynamic one, optionally called if UAR mode is enabled, it adds a whole lot of SSA values, and computations of local variable addresses, that can involve virtual registers, and cause unexpected behavior, when these registers are restored from buffer saved in setjmp. To fix this, just disable dynamic alloca and UAR tricks whenever we see a returns_twice call in the function. Reviewers: rnk Subscribers: llvm-commits, kcc Differential Revision: http://reviews.llvm.org/D11495 llvm-svn: 243561
* COFF: ARM: Fix relocations to thumb code.Rui Ueyama2015-07-294-1/+15
| | | | | | | | Windows ARM is the thumb ARM environment, and pointers to thumb code needs to have its LSB set. When we apply relocations, we need to adjust the LSB if it points to an executable section. llvm-svn: 243560
* COFF: ARM: Fix DLL import table.Rui Ueyama2015-07-292-11/+8
| | | | | | | The previous test was testing -flavor link. This patch correctly tests link2 and fixes a bug that we didn't emit import thunks. llvm-svn: 243559
* [llvm-objdump] Inverting logic to match the word "predicate". Returning ↵Colin LeMahieu2015-07-291-4/+4
| | | | | | true when we want it rather than when we want to discard it. llvm-svn: 243558
* COFF: Fix seh.test.Rui Ueyama2015-07-293-423/+69
| | | | | | | seh.test was testing -flavor link. This should have been testing -flavor link2. llvm-svn: 243557
* [llvm-objdump] Merging MachO DumpSections in to FilterSections. Simplifying ↵Colin LeMahieu2015-07-294-27/+22
| | | | | | some predicate logic. llvm-svn: 243556
* Roll forward r242871Jingyue Wu2015-07-293-19/+75
| | | | | | | r242871 missed one place that should be guarded with isPhysicalReg. This patch fixes that. llvm-svn: 243555
* MIR Serialization: Serialize the '.cfi_def_cfa' CFI instruction.Alex Lorenz2015-07-295-0/+50
| | | | llvm-svn: 243554
* MIR Parser: Parse multiple LHS register machine operands.Alex Lorenz2015-07-293-4/+44
| | | | llvm-svn: 243553
* Use the AddAllArgs overload which accepts an ArrayRef of OptSpecifier.Douglas Katzman2015-07-294-49/+32
| | | | | | Differential Revision: http://reviews.llvm.org/D11599 llvm-svn: 243552
OpenPOWER on IntegriCloud