From 036e73c8bf7b4944a89b7ed5deae4825e22f59f6 Mon Sep 17 00:00:00 2001 From: Filipe Cabecinhas Date: Sun, 5 Jun 2016 18:43:33 +0000 Subject: [BitCode] Make sure storeatomic's argument is an actual PointerType llvm-svn: 271850 --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/Bitcode') diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index c66b60681e5..4eda9d6c9ad 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -5259,6 +5259,7 @@ std::error_code BitcodeReader::parseFunctionBody(Function *F) { unsigned OpNum = 0; Value *Val, *Ptr; if (getValueTypePair(Record, OpNum, NextValueNo, Ptr) || + !isa(Ptr->getType()) || (BitCode == bitc::FUNC_CODE_INST_STOREATOMIC ? getValueTypePair(Record, OpNum, NextValueNo, Val) : popValue(Record, OpNum, NextValueNo, -- cgit v1.2.3