summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix ODR violations caused by putting anonymous namespaces in header files (andRichard Smith2015-03-172-4/+0
| | | | | | | | | | then using the symbols from those anonymous namespaces from outside the anonymous namespace). This was "detected" by causing the modules selfhost to fail in some cases. The corresponding Clang bug was fixed in r232455. llvm-svn: 232457
* Fix test in release mode.Nick Lewycky2015-03-171-1/+1
| | | | llvm-svn: 232456
* [modules] Fix bug where an anonymous namespace could cause the containingRichard Smith2015-03-177-9/+33
| | | | | | | | | | | | | | | | namespace to not merge properly. We have an invariant here: after a declaration reads its canonical declaration, it can assume the canonical declaration is fully merged. This invariant can be violated if deserializing some declaration triggers the deserialization of a later declaration, because that later declaration can in turn deserialize a redeclaration of that first declaration before it is fully merged. The anonymous namespace for a namespace gets stored with the first declaration of that namespace, which may be before its parent namespace, so defer loading it until after we've finished merging the surrounding namespace. llvm-svn: 232455
* Fix the LLVM type used when lowering initializer list reference temporaries ↵Nick Lewycky2015-03-172-2/+29
| | | | | | to global variables. llvm-svn: 232454
* [Object][ELF] ELFEntityIterator : Add operators for random accessShankar Easwaran2015-03-171-0/+12
| | | | | | | Add operators add/subtract for random access. This is essentially used by lld. llvm-svn: 232453
* [IRCE] Re-commit tests cases.Sanjoy Das2015-03-172-0/+74
| | | | | | | | Re-commit the test cases added in r232444. These now use -irce-print-changed-loops and -irce-print-range-checks so they run correctly on a without asserts build of llvm. llvm-svn: 232452
* [IRCE] Add a -irce-print-range-checks option.Sanjoy Das2015-03-171-6/+15
| | | | | | | -irce-print-range-checks prints out the set of range checks recognized by IRCE. llvm-svn: 232451
* CodeGenCXX: Test that linetables work with variadic virtual thunksDuncan P. N. Exon Smith2015-03-171-0/+23
| | | | | | | | Add a frontend test for PR22929, which was fixed by LLVM r232449. Besides the crash test, check that the `!dbg` attachment is sane since its presence was the trigger. llvm-svn: 232450
* MapMetadata: Allow unresolved metadata if it won't changeDuncan P. N. Exon Smith2015-03-173-1/+33
| | | | | | | | | Allow unresolved nodes through the `MapMetadata()` if `RF_NoModuleLevelChanges`, since there's no remapping to do anyway. This fixes PR22929. I'll add a clang test as a follow-up. llvm-svn: 232449
* Make it compile with MSVC 2013.Rui Ueyama2015-03-171-5/+6
| | | | | | | MSVC 2013 cannot compile this code because of C1001 "internal error". Stop using initializer list without type name. llvm-svn: 232448
* [IRCE] Delete two tests.Sanjoy Das2015-03-172-74/+0
| | | | | | | | I accidentally checked in two tests that used -debug-only -- these fail on a release LLVM build. Temporarily delete these from the repo to keep the bots green while I fix this locally. llvm-svn: 232446
* [IRCE] Add comments, NFC.Sanjoy Das2015-03-171-4/+27
| | | | | | | This change adds some comments that justify why a potentially overflowing operation is safe. llvm-svn: 232445
* [IRCE] Support half-range checks.Sanjoy Das2015-03-173-128/+226
| | | | | | | | | | | | This change to IRCE gets it to recognize "half" range checks. Half range checks are range checks that only either check if the index is `slt` some positive integer ("length") or if the index is `sge` `0`. The range solver does not try to be clever / aggressive about solving half-range checks -- it transforms "I < L" to "0 <= I < L" and "0 <= I" to "0 <= I < INT_SMAX". This is safe, but not always optimal. llvm-svn: 232444
* llvm-cov: Warn instead of error if a .gcda has arcs from an exit blockJustin Bogner2015-03-174-1/+7
| | | | | | Patch by Vanderson M. Rosario. Thanks! llvm-svn: 232443
* AsmWriter: Assert on unresolved metadata nodesDuncan P. N. Exon Smith2015-03-171-0/+2
| | | | | | | | | | | | Assert that `MDNode::isResolved()`. While in theory the `Verifier` should catch this, it doesn't descend into all debug info, and the `DebugInfoVerifier` doesn't call into the `Verifier`. Besides, this helps to catch bugs when `-disable-verify=true`. Note that I haven't come across a place where this fails with clang today, so no testcase. llvm-svn: 232442
* XFAIL flaky testsVince Harron2015-03-172-0/+3
| | | | llvm-svn: 232441
* Fix typo in previous commitJustin Bogner2015-03-171-1/+1
| | | | llvm-svn: 232440
* GCOV: Expose the -coverage-exit-block-before-body flag in clang -cc1Justin Bogner2015-03-164-0/+6
| | | | | | | | | This exposes the optional exit block placement logic from r232438 as a clang -cc1 option. There is a test on the llvm side, but there isn't really a way to inspect the gcov options from clang to test it here as well. llvm-svn: 232439
* GCOV: Make the exit block placement from r223193 optionalJustin Bogner2015-03-163-14/+33
| | | | | | | | By default we want our gcov emission to stay 4.2 compatible, which means we need to continue emit the exit block last by default. We add an option to emit it before the body for users that need it. llvm-svn: 232438
* Make ModuleList::GetSharedModule to use module_search_paths parameter.Oleksiy Vyalov2015-03-161-6/+38
| | | | | | http://reviews.llvm.org/D8365 llvm-svn: 232437
* PECOFF: Make FileCOFF:findAtomAt from O(n) to O(1).Rui Ueyama2015-03-161-19/+18
| | | | | | | | I knew I cut corners when I wrote this. Turned out that it is actually slow when a file being read has many symbols. This patch is to stop doing linear search and instead do map lookup. llvm-svn: 232436
* LowerBitSets: do not use private aliases at all on Darwin.Peter Collingbourne2015-03-162-16/+31
| | | | | | | LLVM currently turns these into linker-private symbols, which can be dead stripped by the Darwin linker. llvm-svn: 232435
* Cleanup implementation of formatter for std::vector from libstdc++.Siva Chandra2015-03-161-11/+1
| | | | | | | | | | | | | | Summary: Removed unused variables and methods. Test Plan: dotest.py -p TestDataFormatterStdVector Reviewers: vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8368 llvm-svn: 232434
* Report an error for line number values that don't convert to integers during ↵Jim Ingham2015-03-161-4/+12
| | | | | | | | | | argument parsing so that we can give a more accurate error message. <rdar://problem/20145563> llvm-svn: 232433
* Enable TestDataFormatterStdMap on linux (libstdc++) with clang.Siva Chandra2015-03-162-4/+7
| | | | | | | | | | | | | | | | | | | | | Summary: This test should have been enabled along with 7181dae1248cc1b03505cca1b7c6e3dfeffefc0a, but since the test was actually crashing, I thought it was a much deeper problem. Turns out, all I had to do was to add "-fno-limit-debug-info" when compiling the test case. The test is still skipped when the testcase is compiled with GCC. Test Plan: dotest.py -p TestDataFormatterStdMap Reviewers: vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8364 llvm-svn: 232432
* [clang-tidy] Move google-readability-function check to ↵Alexander Kornienko2015-03-167-12/+14
| | | | | | | | | | | | | | | | readability-named-parameter. Summary: The relevant style rule is going to be removed, thus the check is no longer needed in the Google module. Leaving the check in readability/ in case someone needs it. Reviewers: djasper Reviewed By: djasper Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D8261 llvm-svn: 232431
* Update for llvm API change.Rafael Espindola2015-03-161-2/+3
| | | | llvm-svn: 232430
* Pass in a "const Triple &T" instead of a raw StringRef.Rafael Espindola2015-03-1613-39/+32
| | | | llvm-svn: 232429
* Remove unused argument. NFC.Rafael Espindola2015-03-1610-32/+29
| | | | llvm-svn: 232428
* Add testing for mismatched explicit type on a gep operator when loading from ↵David Blaikie2015-03-163-1/+5
| | | | | | bitcode llvm-svn: 232427
* CFI: Make check-cfi depend on libLTO on Darwin.Peter Collingbourne2015-03-161-0/+5
| | | | llvm-svn: 232426
* Take the non-reference type when constructing a dummy expression.Richard Trieu2015-03-162-2/+19
| | | | | | Otherwise, Expr will assert during construction with a reference type. llvm-svn: 232425
* Add testing for mismatched explicit type on a load instruction when loading ↵David Blaikie2015-03-163-3/+6
| | | | | | from bitcode llvm-svn: 232424
* There is only one Asm streamer, there is no need for targets to register it.Rafael Espindola2015-03-1611-128/+105
| | | | | | | Instead, have the targets register a TargetStreamer to be use with the asm streamer (if any). llvm-svn: 232423
* InstrProf: Fix CoverageMappingReader on big endianJustin Bogner2015-03-163-16/+29
| | | | | | | | This makes the reader check the endianness of the object file its given and behave appropriately. For the test I dug up a really old linker and created a ppc-apple-darwin file for llvm-cov to read. llvm-svn: 232422
* CodeGen: @llvm.eh.typeid.for replaced @llvm.eh.typeid.for.i32David Majnemer2015-03-162-4/+2
| | | | | | | | We removed @llvm.eh.typeid.for.i32 and replaced it with @llvm.eh.typeid.for quite some time ago. Fix up some test cases which never got updated. llvm-svn: 232421
* Test bitcode parsing error-handling for incorrect explicit typeDavid Blaikie2015-03-163-2/+11
| | | | | | | | (turns out I had regressed this when sinking handling of this type down into GetElementPtrInst::Create - since that asserted before the error handling was performed) llvm-svn: 232420
* [Core] Add parallel_for_eachShankar Easwaran2015-03-161-1/+6
| | | | | | | | | | | This adds a parallel_for_each similar to functionality in MSVC concurrency library. This was very patiently reviewed by Rui and credits go to him for this patch. Differential Revision: http://reviews.llvm.org/D8348 llvm-svn: 232419
* Verifier: Don't call debug info verifier if the module is brokenDuncan P. N. Exon Smith2015-03-161-1/+6
| | | | | | | | | | | | | | | | | | | | If `Verifier` has already found a failure, don't call `DebugInfoVerifier`. The latter sometimes crashes in `DebugInfoFinder` when the former would give a nice message. The only two cases I found it crashing are explicit verifier tests I've added: - test/Verifier/llvm.dbg.declare-expression.ll - test/Verifier/llvm.dbg.value-expression.ll However, I assume frontends with bugs will create invalid IR as well. IMO, the `DebugInfoVerifier` should never crash (instead, it should fail to verify), but subtleties like that will be easier to work out once it's enabled again. This is part of PR22777. llvm-svn: 232418
* AsmWriter: Handle broken metadata nodesDuncan P. N. Exon Smith2015-03-162-2/+18
| | | | | | | Print out temporary `MDNode`s so we don't crash in the verifier (or during `dump()` output). llvm-svn: 232417
* DebugInfo: Fix testcases that fail -verify-debug-info=trueDuncan P. N. Exon Smith2015-03-1613-56/+53
| | | | | | | | | | | | | | | | | | As part of PR22777, fix testcases that fail the debug info verifier. The changes fall into the following categories: - Empty `filename:` fields in `MDFile`s. Compile units and some types require non-empty filenames. A number of testcases have empty filenames, probably due to hand-reduction of testcases. - Not-quite empty arrays: `!{i32 0}`. This used to be equivalent in the debug info schema to `!{}`. They cause problems for `!MDSubroutineType`'s `types:` array, since it requires all operands to be valid types. (Note that `!{null}` is the correct type array for functions that take no arguments and return `void`.) - Significantly bitrotted testcases. Nodes got left behind a few upgrades ago because of missing or invalid tags. llvm-svn: 232415
* [ELF] Use pcrel format for eh_frame_ptr field encodingSimon Atanasyan2015-03-162-10/+18
| | | | | | | | | | | | | The `eh_frame_ptr` field in the `.eh_frame_hdr` section contains an address of the `.eh_frame` section. Using an absolute 32-bit format for encoding of this field does not work for 64-bit targets. It is better to use a relative format because it covers both 32-bit and 64-bit cases. Sure this work if a distance between `.eh_frame_hdr` and `.eh_frame` sections is less than 4 Gb but it is a rather correct assumption. http://reviews.llvm.org/D8352 llvm-svn: 232414
* Verifier: Simplify logic in processCallInst(), NFCDuncan P. N. Exon Smith2015-03-161-8/+4
| | | | | | No need for local variables here. llvm-svn: 232413
* IR: Take advantage of -verify checks for MDExpressionDuncan P. N. Exon Smith2015-03-167-27/+19
| | | | | | | | | | | | | | | | | | Now that we check `MDExpression` during `-verify` (r232299), make the `DIExpression` wrapper more strict: - remove redundant checks in `DebugInfoVerifier`, - overload `get()` to `cast_or_null<MDExpression>` (superseding `getRaw()`), - stop checking for null in any accessor, and - remove `DIExpression::Verify()` entirely in favour of `MDExpression::isValid()`. There is still some logic in this class, mostly to do with high-level iterators; I'll defer cleaning up those until the rest of the wrappers are similarly strict. llvm-svn: 232412
* [modules] If we find more formerly-canonical declarations of an entity whileRichard Smith2015-03-167-1/+21
| | | | | | | | | | | building its redecl chains, make sure we pull in the redeclarations of those canonical declarations. It's pretty difficult to reach a situation where we can find more canonical declarations of an entity while building its redecl chains; I think the provided testcase (4 modules and 7 declarations) cannot be reduced further. llvm-svn: 232411
* DebugInfo: Simplify logic in DIType::Verify(), NFCDuncan P. N. Exon Smith2015-03-161-18/+20
| | | | | | | | | | Clarify the logic in `DIType::Verify()` by checking `isBasicType()` earlier, by skipping `else` after `return`s, and by documenting an otherwise opaque check. No functionality change. llvm-svn: 232410
* [LinkerScript] Handle symbols defined in linker scriptsRafael Auler2015-03-1612-27/+191
| | | | | | | | | | Puts symbols defined in linker script expressions in a runtime file that is added as input to the resolver, making the input object files see symbols defined in linker scripts. http://reviews.llvm.org/D8263 llvm-svn: 232409
* Verifier: Remove unnecessary double-checksDuncan P. N. Exon Smith2015-03-162-6/+4
| | | | | | | | | | | Turns out `visitIntrinsicFunctionCall()` descends into all operands already, so explicitly descending in `visitDbgIntrinsic()` (part of r232296) isn't useful. Updating a testcase that doesn't really need `-verify-debug-info` (since r231082) as confirmation. llvm-svn: 232408
* Lambdaify some helper functions. No functionality change.Richard Smith2015-03-162-39/+27
| | | | llvm-svn: 232407
* Add the options, -dylibs-used and -dylib-id to llvm-objdump used with -machoKevin Enderby2015-03-164-1/+78
| | | | | | | to print the Mach-O dynamic shared libraries used by a linked image or the library id of a shared library. llvm-svn: 232406
OpenPOWER on IntegriCloud