2001-10-31 04:32:53 +00:00
|
|
|
//===- llvm/Transforms/CleanupGCCOutput.h - Cleanup GCC Output ---*- C++ -*--=//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_TRANSFORMS_CLEANUPGCCOUTPUT_H
|
|
|
|
#define LLVM_TRANSFORMS_CLEANUPGCCOUTPUT_H
|
|
|
|
|
2002-01-30 23:29:35 +00:00
|
|
|
#include "llvm/Pass.h"
|
2001-10-31 06:35:59 +00:00
|
|
|
|
2002-01-30 23:29:35 +00:00
|
|
|
struct CleanupGCCOutput : public MethodPass {
|
2001-11-03 19:49:54 +00:00
|
|
|
// PatchUpMethodReferences - This is a part of the functionality exported by
|
|
|
|
// the CleanupGCCOutput pass. This causes functions with different signatures
|
|
|
|
// to be linked together if they have the same name.
|
|
|
|
//
|
|
|
|
static bool PatchUpMethodReferences(Module *M);
|
|
|
|
|
2001-10-31 04:32:53 +00:00
|
|
|
// doPassInitialization - For this pass, it removes global symbol table
|
|
|
|
// entries for primitive types. These are never used for linking in GCC and
|
|
|
|
// they make the output uglier to look at, so we nuke them.
|
|
|
|
//
|
2001-10-31 06:35:59 +00:00
|
|
|
// Also, initialize instance variables.
|
|
|
|
//
|
2002-01-21 07:31:50 +00:00
|
|
|
bool doInitialization(Module *M);
|
2001-10-31 04:32:53 +00:00
|
|
|
|
|
|
|
// doPerMethodWork - This method simplifies the specified method hopefully.
|
|
|
|
//
|
2002-01-21 07:31:50 +00:00
|
|
|
bool runOnMethod(Method *M);
|
2001-11-15 04:34:46 +00:00
|
|
|
|
|
|
|
// doPassFinalization - Strip out type names that are unused by the program
|
2002-01-21 07:31:50 +00:00
|
|
|
bool doFinalization(Module *M);
|
2002-01-30 23:29:35 +00:00
|
|
|
|
|
|
|
// getAnalysisUsageInfo - This function needs FindUsedTypes to do its job...
|
|
|
|
//
|
|
|
|
virtual void getAnalysisUsageInfo(Pass::AnalysisSet &Required,
|
|
|
|
Pass::AnalysisSet &Destroyed,
|
|
|
|
Pass::AnalysisSet &Provided);
|
2001-10-31 04:32:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|