summaryrefslogtreecommitdiffstats
path: root/llvm/test/Verifier/module-flags-1.ll
Commit message (Collapse)AuthorAgeFilesLines
* Support for taking the max of module flags when linking, use for PIE/PICTeresa Johnson2017-05-231-1/+5
| | | | | | | | | | | | | | | | | | | | | | Summary: Add Max ModFlagBehavior, which can be used to take the max of two module flag values when merging modules. Use it for the PIE and PIC levels. This avoids an error when we try to import from a module built -fpic into a module built -fPIC, for example. For both PIE and PIC levels, this will be legal, since the code generation gets more conservative as the level is increased. Therefore we can take the max instead of somehow trying to block importing between modules compiled with different levels. Reviewers: tmsriram, pcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33418 llvm-svn: 303590
* IR: Stop printing 'metadata' in Metadata::print()Duncan P. N. Exon Smith2014-12-161-3/+3
| | | | | | | Stop printing `metadata` in `Metadata::print()` and `Metadata::printAsOperand()`. llvm-svn: 224327
* IR: Make metadata typeless in assemblyDuncan P. N. Exon Smith2014-12-151-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that `Metadata` is typeless, reflect that in the assembly. These are the matching assembly changes for the metadata/value split in r223802. - Only use the `metadata` type when referencing metadata from a call intrinsic -- i.e., only when it's used as a `Value`. - Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode` when referencing it from call intrinsics. So, assembly like this: define @foo(i32 %v) { call void @llvm.foo(metadata !{i32 %v}, metadata !0) call void @llvm.foo(metadata !{i32 7}, metadata !0) call void @llvm.foo(metadata !1, metadata !0) call void @llvm.foo(metadata !3, metadata !0) call void @llvm.foo(metadata !{metadata !3}, metadata !0) ret void, !bar !2 } !0 = metadata !{metadata !2} !1 = metadata !{i32* @global} !2 = metadata !{metadata !3} !3 = metadata !{} turns into this: define @foo(i32 %v) { call void @llvm.foo(metadata i32 %v, metadata !0) call void @llvm.foo(metadata i32 7, metadata !0) call void @llvm.foo(metadata i32* @global, metadata !0) call void @llvm.foo(metadata !3, metadata !0) call void @llvm.foo(metadata !{!3}, metadata !0) ret void, !bar !2 } !0 = !{!2} !1 = !{i32* @global} !2 = !{!3} !3 = !{} I wrote an upgrade script that handled almost all of the tests in llvm and many of the tests in cfe (even handling many `CHECK` lines). I've attached it (or will attach it in a moment if you're speedy) to PR21532 to help everyone update their out-of-tree testcases. This is part of PR21532. llvm-svn: 224257
* IR: Canonicalize metadata formatting, NFCDuncan P. N. Exon Smith2014-12-111-22/+19
| | | | | | | | | | | | Canonicalize formatting of metadata to make it easier to upgrade via scripts -- in particular, one line per metadata definition makes it more `sed`-able. This is preparation for changing the assembly syntax for metadata [1]. [1]: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141208/248449.html llvm-svn: 224002
* [IR] Add 'Append' and 'AppendUnique' module flag behaviors.Daniel Dunbar2013-01-161-1/+10
| | | | llvm-svn: 172659
* [IR] Add verification for module flags with the "require" behavior.Daniel Dunbar2013-01-151-2/+16
| | | | llvm-svn: 172549
* [IR] Add verifier support for llvm.module.flags.Daniel Dunbar2013-01-151-0/+37
- Also, update the LangRef documentation on module flags to match the implementation. llvm-svn: 172498
OpenPOWER on IntegriCloud