diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2017-06-12 20:10:48 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2017-06-12 20:10:48 +0000 |
| commit | 89061b2224456b46fb09a62533687dd3bf746afa (patch) | |
| tree | 30716f798fdb25531fe7c4790d84f0b272bcae50 /llvm/lib/IR | |
| parent | 30b2c6bdb7e87b0fbcfcf17898dba1d2e982d5b3 (diff) | |
| download | bcm5719-llvm-89061b2224456b46fb09a62533687dd3bf746afa.tar.gz bcm5719-llvm-89061b2224456b46fb09a62533687dd3bf746afa.zip | |
IR: Replace the "Linker Options" module flag with "llvm.linker.options" named metadata.
The new metadata is easier to manipulate than module flags.
Differential Revision: https://reviews.llvm.org/D31349
llvm-svn: 305227
Diffstat (limited to 'llvm/lib/IR')
| -rw-r--r-- | llvm/lib/IR/Verifier.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 5c1b3412840..cf54cc3d6ae 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -1330,6 +1330,14 @@ Verifier::visitModuleFlag(const MDNode *Op, = mdconst::dyn_extract_or_null<ConstantInt>(Op->getOperand(2)); Assert(Value, "wchar_size metadata requires constant integer argument"); } + + if (ID->getString() == "Linker Options") { + // If the llvm.linker.options named metadata exists, we assume that the + // bitcode reader has upgraded the module flag. Otherwise the flag might + // have been created by a client directly. + Assert(M.getNamedMetadata("llvm.linker.options"), + "'Linker Options' named metadata no longer supported"); + } } /// Return true if this attribute kind only applies to functions. |

