Fix the assertion failure caused by http://reviews.llvm.org/D22118
authorDehao Chen <dehao@google.com>
Mon, 11 Jul 2016 17:36:02 +0000 (17:36 +0000)
committerDehao Chen <dehao@google.com>
Mon, 11 Jul 2016 17:36:02 +0000 (17:36 +0000)
commit71021cdf474939ce92b8d220feebd4fb2a8c3dc4
tree1c4e9f2cbf77d5e9ddcc011778f66630a26242ef
parentc2406d46b8aad998eab1218be7eafd534cfaaf38
Fix the assertion failure caused by reviews.llvm.org/D22118

Summary: http://reviews.llvm.org/D22118 uses metadata to store the call count, which makes it possible to have branch weight to have only one elements. Also fix the assertion failure in inliner when checking the instruction type to include "invoke" instruction.

Reviewers: mkuper, dnovillo

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D22228

llvm-svn: 275079
llvm/lib/IR/MDBuilder.cpp
llvm/lib/IR/Metadata.cpp