summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Verifier.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [Verifier] Assert gc_relocate always return a pointer type Chen Li2015-05-181-2/+12
| | | | | | | | | | | | | | Summary: Add an assertion in verifier.cpp to make sure gc_relocate relocate a gc pointer, and its return type has the same address space with the relocated pointer. Reviewers: reames, AndyAyers, sanjoy, pgavlin Reviewed By: pgavlin Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9695 llvm-svn: 237605
* [Safepoints][Verifier] Fix a tautological Assert.Sanjoy Das2015-05-131-1/+1
| | | | llvm-svn: 237287
* Add function entry count metadata.Diego Novillo2015-05-131-0/+33
| | | | | | | | | | | | | | | | | | | | Summary: This adds three Function methods to handle function entry counts: setEntryCount() and getEntryCount(). Entry counts are stored under the MD_prof metadata node with the name "function_entry_count". They are unsigned 64 bit values set by profilers (instrumentation and sample profiler changes coming up). Added documentation for new profile metadata and tests. Reviewers: dexonsmith, bogner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9628 llvm-svn: 237260
* [Statepoints] Support for "patchable" statepoints.Sanjoy Das2015-05-121-13/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change adds two new parameters to the statepoint intrinsic, `i64 id` and `i32 num_patch_bytes`. `id` gets propagated to the ID field in the generated StackMap section. If the `num_patch_bytes` is non-zero then the statepoint is lowered to `num_patch_bytes` bytes of nops instead of a call (the spill and reload code remains unchanged). A non-zero `num_patch_bytes` is useful in situations where a language runtime requires complete control over how a call is lowered. This change brings statepoints one step closer to patchpoints. With some additional work (that is not part of this patch) it should be possible to get rid of `TargetOpcode::STATEPOINT` altogether. PlaceSafepoints generates `statepoint` wrappers with `id` set to `0xABCDEF00` (the old default value for the ID reported in the stackmap) and `num_patch_bytes` set to `0`. This can be made more sophisticated later. Reviewers: reames, pgavlin, swaroop.sridhar, AndyAyers Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9546 llvm-svn: 237214
* Convert PHI getIncomingValue() to foreach over incoming_values(). NFC.Pete Cooper2015-05-121-2/+2
| | | | | | | | We already had a method to iterate over all the incoming values of a PHI. This just changes all eligible code to use it. Ineligible code included anything which cared about the index, or was also trying to get the i'th incoming BB. llvm-svn: 237169
* Rename variables in gc_relocate related functions to follow LLVM's naming ↵Sanjoy Das2015-05-111-8/+8
| | | | | | | | | | | | | | | | | | | | conventions. Summary: This patch is to rename some variables to CamelCase in gc_relocate related functions. There is no functionality change. Patch by Chen Li! Reviewers: reames, AndyAyers, sanjoy Reviewed By: sanjoy Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9681 llvm-svn: 237069
* Simplify a return expression and an access to an alloca's allocated typeDavid Blaikie2015-05-111-3/+3
| | | | llvm-svn: 237065
* [RewriteStatepointsForGC] Fix a bug on creating gc_relocate for pointer to ↵Sanjoy Das2015-05-111-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vector of pointers Summary: In RewriteStatepointsForGC pass, we create a gc_relocate intrinsic for each relocated pointer, and the gc_relocate has the same type with the pointer. During the creation of gc_relocate intrinsic, llvm requires to mangle its type. However, llvm does not support mangling of all possible types. RewriteStatepointsForGC will hit an assertion failure when it tries to create a gc_relocate for pointer to vector of pointers because mangling for vector of pointers is not supported. This patch changes the way RewriteStatepointsForGC pass creates gc_relocate. For each relocated pointer, we erase the type of pointers and create an unified gc_relocate of type i8 addrspace(1)*. Then a bitcast is inserted to convert the gc_relocate to the correct type. In this way, gc_relocate does not need to deal with different types of pointers and the unsupported type mangling is no longer a problem. This change would also ease further merge when LLVM erases types of pointers and introduces an unified pointer type. Some minor changes are also introduced to gc_relocate related part in InstCombineCalls, CodeGenPrepare, and Verifier accordingly. Patch by Chen Li! Reviewers: reames, AndyAyers, sanjoy Reviewed By: sanjoy Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9592 llvm-svn: 237009
* Revert r236912.Quentin Colombet2015-05-091-4/+4
| | | | | | | | | | | | | | Author: dblaikie Date: Fri May 8 17:47:50 2015 New Revision: 236912 URL: http://llvm.org/viewvc/llvm-project?rev=236912&view=rev Log: [opaque pointer type] Cleanup a few references to pointee types using nearby non-pointee types of the same value & cleanup a convoluted return expression while I'm here llvm-svn: 236919
* [opaque pointer type] Cleanup a few references to pointee types using nearby ↵David Blaikie2015-05-081-4/+4
| | | | | | | | non-pointee types of the same value & cleanup a convoluted return expression while I'm here llvm-svn: 236912
* Extend the statepoint intrinsic to allow statepoints to be marked as ↵Pat Gavlin2015-05-081-7/+30
| | | | | | | | | | | | | | | | | | | | | | transitions from GC-aware code to code that is not GC-aware. This changes the shape of the statepoint intrinsic from: @llvm.experimental.gc.statepoint(anyptr target, i32 # call args, i32 unused, ...call args, i32 # deopt args, ...deopt args, ...gc args) to: @llvm.experimental.gc.statepoint(anyptr target, i32 # call args, i32 flags, ...call args, i32 # transition args, ...transition args, i32 # deopt args, ...deopt args, ...gc args) This extension offers the backend the opportunity to insert (somewhat) arbitrary code to manage the transition from GC-aware code to code that is not GC-aware and back. In order to support the injection of transition code, this extension wraps the STATEPOINT ISD node generated by the usual lowering lowering with two additional nodes: GC_TRANSITION_START and GC_TRANSITION_END. The transition arguments that were passed passed to the intrinsic (if any) are lowered and provided as operands to these nodes and may be used by the backend during code generation. Eventually, the lowering of the GC_TRANSITION_{START,END} nodes should be informed by the GC strategy in use for the function containing the intrinsic call; for now, these nodes are instead replaced with no-ops. Differential Revision: http://reviews.llvm.org/D9501 llvm-svn: 236888
* [opaque pointer type] Explicit pointee type for GEPOperator/GEPConstantExpr.David Blaikie2015-05-081-2/+2
| | | | | | | Also a couple of other changes to avoid use of PointerType::getElementType here & there too. llvm-svn: 236799
* Change typeIncompatible to return an AttrBuilder instead of new-ing an ↵Pete Cooper2015-05-061-2/+3
| | | | | | | | | | AttributeSet. This makes use of the new API which can remove attributes from a set given a builder. This is much faster than creating a temporary set and reduces llc time by about 0.3% which was all spent creating temporary attributes sets on the context. llvm-svn: 236668
* [Statepoint] Clean up Statepoint.h: accessor names.Sanjoy Das2015-05-061-2/+2
| | | | | | Use getFoo() as accessors consistently and some other naming changes. llvm-svn: 236564
* Temporarily relax a check in the debug info verifier.Adrian Prantl2015-04-291-0/+9
| | | | | | | | | | | | The clang frontend helps out GDB by emitting the members of local anonymous unions as artificial local variables with shared storage. When SROA splits the storage for artificial local variables that are smaller than the entire union, the overhang piece will be outside of the allotted space for the variable and this check fails. rdar://problem/20730771 llvm-svn: 236124
* IR: Give 'DI' prefix to debug info metadataDuncan P. N. Exon Smith2015-04-291-103/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Finish off PR23080 by renaming the debug info IR constructs from `MD*` to `DI*`. The last of the `DIDescriptor` classes were deleted in r235356, and the last of the related typedefs removed in r235413, so this has all baked for about a week. Note: If you have out-of-tree code (like a frontend), I recommend that you get everything compiling and tests passing with the *previous* commit before updating to this one. It'll be easier to keep track of what code is using the `DIDescriptor` hierarchy and what you've already updated, and I think you're extremely unlikely to insert bugs. YMMV of course. Back to *this* commit: I did this using the rename-md-di-nodes.sh upgrade script I've attached to PR23080 (both code and testcases) and filtered through clang-format-diff.py. I edited the tests for test/Assembler/invalid-generic-debug-node-*.ll by hand since the columns were off-by-three. It should work on your out-of-tree testcases (and code, if you've followed the advice in the previous paragraph). Some of the tests are in badly named files now (e.g., test/Assembler/invalid-mdcompositetype-missing-tag.ll should be 'dicompositetype'); I'll come back and move the files in a follow-up commit. llvm-svn: 236120
* Verifier: Function metadata attachments require a bodyDuncan P. N. Exon Smith2015-04-241-0/+13
| | | | | | | | Add a verifier check that only functions with bodies have metadata attachments. This should help catch bugs in frontends and transformation passes. Part of PR23340. llvm-svn: 235784
* [opaque pointer type] Verifier/AutoUpgrade: Remove a few uses of ↵David Blaikie2015-04-241-7/+3
| | | | | | PointerType::getElementType llvm-svn: 235777
* Recommit r235458: [opaque pointer type] Avoid using ↵David Blaikie2015-04-231-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PointerType::getElementType for a few cases of CallInst (reverted in r235533) Original commit message: "Calls to llvm::Value::mutateType are becoming extra-sensitive now that instructions have extra type information that will not be derived from operands or result type (alloca, gep, load, call/invoke, etc... ). The special-handling for mutateType will get more complicated as this work continues - it might be worth making mutateType virtual & pushing the complexity down into the classes that need special handling. But with only two significant uses of mutateType (vectorization and linking) this seems OK for now. Totally open to ideas/suggestions/improvements, of course. With this, and a bunch of exceptions, we can roundtrip an indirect call site through bitcode and IR. (a direct call site is actually trickier... I haven't figured out how to deal with the IR deserializer's lazy construction of Function/GlobalVariable decl's based on the type of the entity which means looking through the "pointer to T" type referring to the global)" The remapping done in ValueMapper for LTO was insufficient as the types weren't correctly mapped (though I was using the post-mapped operands, some of those operands might not have been mapped yet so the type wouldn't be post-mapped yet). Instead use the pre-mapped type and explicitly map all the types. llvm-svn: 235651
* Revert "[opaque pointer type] Avoid using PointerType::getElementType for a ↵David Blaikie2015-04-221-5/+1
| | | | | | | | | | | few cases of CallInst" This reverts commit r235458. It looks like this might be breaking something LTO-ish. Looking into it & will recommit with a fix/test case/etc once I've got more to go on. llvm-svn: 235533
* [opaque pointer type] Avoid using PointerType::getElementType for a few ↵David Blaikie2015-04-211-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | cases of CallInst Calls to llvm::Value::mutateType are becoming extra-sensitive now that instructions have extra type information that will not be derived from operands or result type (alloca, gep, load, call/invoke, etc... ). The special-handling for mutateType will get more complicated as this work continues - it might be worth making mutateType virtual & pushing the complexity down into the classes that need special handling. But with only two significant uses of mutateType (vectorization and linking) this seems OK for now. Totally open to ideas/suggestions/improvements, of course. With this, and a bunch of exceptions, we can roundtrip an indirect call site through bitcode and IR. (a direct call site is actually trickier... I haven't figured out how to deal with the IR deserializer's lazy construction of Function/GlobalVariable decl's based on the type of the entity which means looking through the "pointer to T" type referring to the global) llvm-svn: 235458
* [opaque pointer type] Access the pointee of the result type from the GEP ↵David Blaikie2015-04-171-2/+1
| | | | | | | | | | rather than pulling it out of the pointer result type The implementation of this GEP::getResultElementType will be refactored to either rely on a member variable, or recompute the value from the indicies (any preferences?). llvm-svn: 235236
* [opaque pointer type] Query the GEP for its source element type directly ↵David Blaikie2015-04-171-2/+1
| | | | | | rather than finding it through the pointer type of the first operand in the Verifier llvm-svn: 235235
* DebugInfo: Remove 'inlinedAt:' field from MDLocalVariableDuncan P. N. Exon Smith2015-04-151-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove 'inlinedAt:' from MDLocalVariable. Besides saving some memory (variables with it seem to be single largest `Metadata` contributer to memory usage right now in -g -flto builds), this stops optimization and backend passes from having to change local variables. The 'inlinedAt:' field was used by the backend in two ways: 1. To tell the backend whether and into what a variable was inlined. 2. To create a unique id for each inlined variable. Instead, rely on the 'inlinedAt:' field of the intrinsic's `!dbg` attachment, and change the DWARF backend to use a typedef called `InlinedVariable` which is `std::pair<MDLocalVariable*, MDLocation*>`. This `DebugLoc` is already passed reliably through the backend (as verified by r234021). This commit removes the check from r234021, but I added a new check (that will survive) in r235048, and changed the `DIBuilder` API in r235041 to require a `!dbg` attachment whose 'scope:` is in the same `MDSubprogram` as the variable's. If this breaks your out-of-tree testcases, perhaps the script I used (mdlocalvariable-drop-inlinedat.sh) will help; I'll attach it to PR22778 in a moment. llvm-svn: 235050
* Verifier: Check that @llvm.dbg.* intrinsics have a !dbg attachmentDuncan P. N. Exon Smith2015-04-151-4/+38
| | | | | | | | | | | | | | | | | | | | | | Before we start to rely on valid `!dbg` attachments, add a check to the verifier that `@llvm.dbg.*` intrinsics always have one. Also check that the `scope:` fields point at the same `MDSubprogram`. This is in the context of PR22778. The check that the `inlinedAt:` fields agree has baked for a while (since r234021), so I'll kill [1] the `MDLocalVariable::getInlinedAt()` field soon. [1]: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150330/269387.html Unfortunately, that means it's impossible to keep the current `Verifier` checks, which rely on comparing `inlinedAt:` fields. We'll be able to keep the checks I'm adding here. If this breaks your out-of-tree testcases, the upgrade script (add-dbg-to-intrinsics.sh) attached to PR22778 that I used for r235040 might fix them for you. llvm-svn: 235048
* DebugInfo: Gut DISubprogram and DILexicalBlock*Duncan P. N. Exon Smith2015-04-141-1/+1
| | | | | | | Gut the `DIDescriptor` wrappers around `MDLocalScope` subclasses. Note that `DILexicalBlock` wraps `MDLexicalBlockBase`, not `MDLexicalBlock`. llvm-svn: 234850
* Reapply "Verifier: Check for incompatible bit piece expressions"Duncan P. N. Exon Smith2015-04-131-7/+92
| | | | | | | | | | | | | | | | | | | | | This reverts commit r234717, reapplying r234698 (in spirit). As described in r234717, the original `Verifier` check had a use-after-free. Instead of storing pointers to "interesting" debug info intrinsics whose bit piece expressions should be verified once we have typerefs, do a second traversal. I've added a testcase to catch the `llc` crasher. Original commit message: Verifier: Check for incompatible bit piece expressions Convert an assertion into a `Verifier` check. Bit piece expressions must fit inside the variable, and mustn't be the entire variable. Catching this in the verifier will help us find bugs sooner, and makes `DIVariable::getSizeInBits()` dead code. llvm-svn: 234776
* Revert "Verifier: Check for incompatible bit piece expressions"Duncan P. N. Exon Smith2015-04-131-89/+7
| | | | | | | | | | | | | This reverts commit r234698. This caused a use-after-free: `QueuedBitPieceExpressions` holds onto references to `DbgInfoIntrinsic`s and references them past where they're deleted (this is because the verifier is run as a function pass, and then `verifyTypeRefs()` is called during `doFinalization()`). I'll include a reduced crasher for `llc` when I recommit the check. llvm-svn: 234717
* DebugInfo: Make MDSubprogram::getFunction() return ConstantDuncan P. N. Exon Smith2015-04-111-5/+1
| | | | | | | | Change `MDSubprogram::getFunction()` and `MDGlobalVariable::getConstant()` to return a `Constant`. Previously, both returned `ConstantAsMetadata`. llvm-svn: 234699
* Verifier: Check for incompatible bit piece expressionsDuncan P. N. Exon Smith2015-04-111-7/+89
| | | | | | | | | Convert an assertion into a `Verifier` check. Bit piece expressions must fit inside the variable, and mustn't be the entire variable. Catching this in the verifier will help us find bugs sooner, and makes `DIVariable::getSizeInBits()` dead code. llvm-svn: 234698
* IR: Remove MDTupleTypedArrayWrapper::operator MDTuple*()Duncan P. N. Exon Smith2015-04-071-0/+4
| | | | | | | | | | | | Remove `MDTupleTypedArrayWrapper::operator MDTuple*()`, since it causes ambiguity (at least in some [1] compilers [2]) when using indexes to `MDTupleTypedArrayWrapper::operator[](unsigned)` that are convertible to (but not the same as) `unsigned`. [1]: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/2308 [2]: http://lab.llvm.org:8011/builders/clang-cmake-mips/builds/4442 llvm-svn: 234326
* [opaque pointer type] Avoid using PointerType::getElementType when parsing IRDavid Blaikie2015-04-061-3/+1
| | | | | | | | | | A few calls are left in for error checking - but I'm commenting those out & trying to build some IR tests (aiming for Argument Promotion to start with). When I get any of these tests passing I may add flag to disable the checking so I can add tests that pass with the assertion in place. llvm-svn: 234206
* Metadata: Add typed array-like wrapper for MDTupleDuncan P. N. Exon Smith2015-04-061-2/+2
| | | | | | | | | Add `MDTupleTypedArrayWrapper`, a wrapper around `MDTuple` that adapts it to look like an array and cast its operands to the given type. This is designed to be a replacement for `DITypedArray<>`, which is in the `DIDescriptor` hierarchy. llvm-svn: 234183
* Verifier: Check composite type template paramsDuncan P. N. Exon Smith2015-04-061-11/+18
| | | | | | | | | Add missing checks for `templateParams:` in `MDCompositeType`. Pull the current check for `MDSubprogram` to reduce duplicated code and fix it up to print a good message when the immediate operand isn't an `MDTuple` (as a drive-by, make the same fix to `variables:` in `MDSubprogram`). llvm-svn: 234177
* [WinEH] Sink UnwindHelp completely out of IRDavid Majnemer2015-04-031-7/+0
| | | | | | | | We don't need to represent UnwindHelp in IR. Instead, we can use the knowledge that we are emitting the parent function to decide if we should create the UnwindHelp stack object. llvm-svn: 234061
* Verifier: Check that inlined-at locations agreeDuncan P. N. Exon Smith2015-04-031-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check that the `MDLocalVariable::getInlinedAt()` in a debug info intrinsic's variable always matches the `MDLocation::getInlinedAt()` of its `!dbg` attachment. The goal here is to get rid of `MDLocalVariable::getInlinedAt()` entirely (PR22778), since it's expensive and unnecessary, but I'll let this verifier check bake for a while (a week maybe?) first. I've updated the testcases that had the wrong value for `inlinedAt:`. This checks that things are sane in the IR, but currently things go out of whack in a few places in the backend. I'll follow shortly with assertions in the backend (with code fixes). If you have out-of-tree testcases that just started failing, here's how I updated these ones: 1. The verifier check gives you the basic block, function, instruction, and relevant metadata arguments (metadata numbering doesn't necessarily match the source file, unfortunately). 2. Look at the `@llvm.dbg.*()` instruction, and compare the `inlinedAt:` fields of the variable argument (second `metadata` argument) and the `!dbg` attachment. 3. Figure out based on the variable `scope:` chain and the functions in the file whether the variable has been inlined (and into what), so you can determine which `inlinedAt:` is actually correct. In all of the in-tree testcases, the `!MDLocation()` was correct and the `!MDLocalVariable()` was wrong, but YMMV. 4. Duplicate the metadata that you're going to change, and add/drop the `inlinedAt:` field from one of them. Be careful that the other references to the same metadata node point at the correct one. llvm-svn: 234021
* [WinEH] Make llvm.eh.actions use frameescape indices for catch paramsReid Kleckner2015-04-021-0/+2
| | | | | | | | | | | | | | | | | | This makes it possible to use the same representation of llvm.eh.actions in outlined handlers as we use in the parent function because i32's are just constants that can be copied freely between functions. I had to add a sentinel alloca to the list of child allocas so that we don't try to sink the catch object into the handler. Normally, one would use nullptr for this kind of thing, but TinyPtrVector doesn't support null elements. More than that, it's elements have to have a suitable alignment. Therefore, I settled on this for my sentinel: AllocaInst *getCatchObjectSentinel() { return static_cast<AllocaInst *>(nullptr) + 1; } llvm-svn: 233947
* [WinEH] Generate .xdata for catch handlersDavid Majnemer2015-03-311-7/+0
| | | | | | | | | | | | | | This lets us catch exceptions in simple cases. N.B. Things that do not work include (but are not limited to): - Throwing from within a catch handler. - Catching an object with a named catch parameter. - 'CatchHigh' is fictitious, we aren't sure of its purpose. - We aren't entirely efficient with regards to the number of EH states that we generate. - IP-to-State tables are sensitive to the order of emission. llvm-svn: 233767
* Verifier: Don't return early from verifyTypeRefs()Duncan P. N. Exon Smith2015-03-311-8/+2
| | | | | | | | We'll no longer crash in the `verifyTypeRefs()` (used to be called `verifyDebugInfo()`), so there's no reason to return early here. Remove the `EverBroken` member since this was the only use! llvm-svn: 233665
* Verifier: Explicitly verify type referencesDuncan P. N. Exon Smith2015-03-311-83/+93
| | | | | | | | | | | | | `verifyDebugInfo()` was doing two things: - Asserting on unresolved type references. - Calling `Verify()` functions for various types of debug info. The `Verify()` functions have been gutted, so rename the function to `verifyTypeRefs()` and explicitly check those. Instead of assertions, we get nice error messages now. llvm-svn: 233664
* Verifier: Move over DISubprogram::Verify()Duncan P. N. Exon Smith2015-03-311-0/+39
| | | | | | | | | | | | | Move over the remaining (somewhat complicated) check from `DISubprogram::Verify()`. I suspect this check could be optimized -- e.g., it would be nice not to do another full traversal here -- but it's not exactly obvious how. For now, just bring it over as is. Once we have a better model for the "canonical" subprogram of a `Function`, we should enforce that all `!dbg` attachments lead to the canonical one. llvm-svn: 233663
* Verifier: Check reference flags in debug infoDuncan P. N. Exon Smith2015-03-311-0/+11
| | | | | | Move over checks of `&` and `&&` flags. llvm-svn: 233658
* Verifier: Move more debug info checks away from Verify()Duncan P. N. Exon Smith2015-03-311-0/+1
| | | | | | | | | | Most of these checks were already in the `Verifier` so this is more of a cleanup. Now almost everything is over there. Now that require a `name:` for `MDGlobalVariable`, add a check in `LLParser` for it. llvm-svn: 233657
* Verifier: Move checks over from DIDescriptor::Verify()Duncan P. N. Exon Smith2015-03-311-0/+31
| | | | | | | | | | | | | | Move over some more checks from `DIDescriptor::Verify()`, and change `LLParser` to require non-null `file:` fields in compile units. I've ignored the comment in test/Assembler/metadata-null-operands.ll since I disagree with it. At the time that test was written (r229960), the debug info verifier wasn't on by default, so my comment there is in the context of not expecting the verifier to be useful. It is now, and besides that, since r233394 we can check when parsing textual IR whether an operand is null that shouldn't be. llvm-svn: 233654
* [opaque pointer type] Change GetElementPtrInst::getIndexedType to take the ↵David Blaikie2015-03-301-1/+1
| | | | | | | | | | pointee type This pushes the use of PointerType::getElementType up into several callers - I'll essentially just have to keep pushing that up the stack until I can eliminate every call to it... llvm-svn: 233604
* Verifier: Add operand checks for remaining debug infoDuncan P. N. Exon Smith2015-03-301-0/+27
| | | | llvm-svn: 233565
* Verifier: Loosen r233559 check for 'function:' field in MDSubprogramDuncan P. N. Exon Smith2015-03-301-3/+2
| | | | | | | | | | Stop worrying about what the `function:` field is in `MDSubprogram`, since it could be a bitcast [1]. Just check its type and leave it at that. [1]: http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_build/3540/ llvm-svn: 233562
* Verifier: Add operand checks for MDLexicalBlockDuncan P. N. Exon Smith2015-03-301-2/+12
| | | | | | | | | | Add operand checks for `MDLexicalBlock` and `MDLexicalBlockFile`. Like `MDLocalVariable` and `MDLocation`, these nodes always require a scope. There was no test bitrot to fix here (just updated the serialization tests in test/Assembler/mdlexicalblock.ll). llvm-svn: 233561
* Verifier: Check operands of MDSubprogram nodesDuncan P. N. Exon Smith2015-03-301-0/+58
| | | | | | | | | | | Check operands of `MDSubprogram`s in the verifier, and update the accessors and factory functions to use more specific types. There were a lot of broken testcases, which I fixed in r233466. If you have out-of-tree tests for debug info, you probably need similar changes to the ones I made there. llvm-svn: 233559
* Verifier: Allow subroutine types to have no type arrayDuncan P. N. Exon Smith2015-03-281-6/+5
| | | | | | | | | Loosen one check from r233446: as long as `DIBuilder` requires a non-null type for every subprogram, we should allow a null type array. Also add tests for the rest of `MDSubroutineType`, which were somehow missing. llvm-svn: 233468
OpenPOWER on IntegriCloud