-cleangcc pass now remove type names that are never referenced and type names for pointers to primitive types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1312 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2001-11-15 04:34:46 +00:00
parent 20ac79e329
commit 430aa9ec1c
2 changed files with 48 additions and 4 deletions

View File

@ -6,10 +6,11 @@
#ifndef LLVM_TRANSFORMS_CLEANUPGCCOUTPUT_H
#define LLVM_TRANSFORMS_CLEANUPGCCOUTPUT_H
#include "llvm/Pass.h"
#include "llvm/Analysis/FindUsedTypes.h"
class CleanupGCCOutput : public Pass {
Method *Malloc, *Free; // Pointers to external declarations, or null if none
FindUsedTypes FUT; // Use FUT to eliminate type names that are never used
public:
inline CleanupGCCOutput() : Malloc(0), Free(0) {}
@ -31,6 +32,9 @@ public:
// doPerMethodWork - This method simplifies the specified method hopefully.
//
bool doPerMethodWork(Method *M);
// doPassFinalization - Strip out type names that are unused by the program
bool doPassFinalization(Module *M);
private:
bool doOneCleanupPass(Method *M);
};