Fix a bug that prevented llvm-extract -delete from working.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57864 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2008-10-21 01:08:07 +00:00
parent 01426e1a27
commit b9a31a15f9

View File

@ -52,7 +52,7 @@ namespace {
bool deleteGV() {
for (std::vector<GlobalValue*>::iterator GI = Named.begin(),
GE = Named.end(); GI != GE; ++GI) {
if (Function* NamedFunc = dyn_cast<Function>(&*GI)) {
if (Function* NamedFunc = dyn_cast<Function>(*GI)) {
// If we're in relinking mode, set linkage of all internal callees to
// external. This will allow us extract function, and then - link
// everything together