Adding PoisonValue for representing poison value explicitly in IR
Define ConstantData::PoisonValue. Add support for poison value to LLLexer/LLParser/BitcodeReader/BitcodeWriter. Add support for poison value to llvm-c interface. Add support for poison value to OCaml binding. Add m_Poison in PatternMatch. Differential Revision: https://reviews.llvm.org/D71126
This commit is contained in:
@@ -2410,6 +2410,9 @@ Error BitcodeReader::parseConstants() {
|
||||
case bitc::CST_CODE_UNDEF: // UNDEF
|
||||
V = UndefValue::get(CurTy);
|
||||
break;
|
||||
case bitc::CST_CODE_POISON: // POISON
|
||||
V = PoisonValue::get(CurTy);
|
||||
break;
|
||||
case bitc::CST_CODE_SETTYPE: // SETTYPE: [typeid]
|
||||
if (Record.empty())
|
||||
return error("Invalid record");
|
||||
|
||||
Reference in New Issue
Block a user