diff options
Diffstat (limited to 'lib/IR/Verifier.cpp')
| -rw-r--r-- | lib/IR/Verifier.cpp | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp index 3b68d6365872..21e8048442be 100644 --- a/lib/IR/Verifier.cpp +++ b/lib/IR/Verifier.cpp @@ -1317,6 +1317,12 @@ Verifier::visitModuleFlag(const MDNode *Op,      Assert(Inserted,             "module flag identifiers must be unique (or of 'require' type)", ID);    } + +  if (ID->getString() == "wchar_size") { +    ConstantInt *Value +      = mdconst::dyn_extract_or_null<ConstantInt>(Op->getOperand(2)); +    Assert(Value, "wchar_size metadata requires constant integer argument"); +  }  }  /// Return true if this attribute kind only applies to functions.  | 
