diff options
author | Chris Lattner <sabre@nondot.org> | 2003-09-15 04:52:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-09-15 04:52:00 +0000 |
commit | c9d3e5721b4e7c566a5e3fa4d312ebc6ba935f95 (patch) | |
tree | d5fdf258758d6b6e931a86dfe0c033ae59f99b6d /lib | |
parent | f52d01bbc58c116f7c83f3320a0f2dff9ac1b3d6 (diff) | |
download | external_llvm-c9d3e5721b4e7c566a5e3fa4d312ebc6ba935f95.zip external_llvm-c9d3e5721b4e7c566a5e3fa4d312ebc6ba935f95.tar.gz external_llvm-c9d3e5721b4e7c566a5e3fa4d312ebc6ba935f95.tar.bz2 |
Ugh, a bug fix needed because of the bug in the CallGraph code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8519 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/IPO/GlobalDCE.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/GlobalDCE.cpp b/lib/Transforms/IPO/GlobalDCE.cpp index f991229..5ce7962 100644 --- a/lib/Transforms/IPO/GlobalDCE.cpp +++ b/lib/Transforms/IPO/GlobalDCE.cpp @@ -56,9 +56,11 @@ namespace { // Walk the function list, removing prototypes for functions which are not // used. for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) - if (I->use_size() == 0 && I->isExternal()) + if (I->use_size() == 0 && I->isExternal()) { + CallGraph[I]->removeAllCalledFunctions(); delete CallGraph.removeFunctionFromModule(I); - + } + return true; } |