Assert that we have all use/users in the getters.
authorRafael Espindola <rafael.espindola@gmail.com>
Sat, 19 Dec 2015 20:03:23 +0000 (20:03 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sat, 19 Dec 2015 20:03:23 +0000 (20:03 +0000)
commitfdb838f3f8a8b6896bbbd5285555874eb3b748eb
treebb327efea5430802f5c35627328bdffe7a062dd1
parent25b4ccf2a65d754b09169602e88e12637d7068b7
Assert that we have all use/users in the getters.

An error that is pretty easy to make is to use the lazy bitcode reader
and then do something like

if (V.use_empty())

The problem is that uses in unmaterialized functions are not accounted
for.

This patch adds asserts that all uses are known.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256105 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Module.h
include/llvm/IR/Value.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/IR/Module.cpp
lib/IR/Value.cpp
lib/IR/Verifier.cpp
tools/llvm-extract/llvm-extract.cpp