IPO.h revision 5048c3b853b8be541479e300705a88375569c8b1
1//===- llvm/Transforms/CleanupGCCOutput.h - Cleanup GCC Output ---*- C++ -*--=//
2//
3//
4//===----------------------------------------------------------------------===//
5
6#ifndef LLVM_TRANSFORMS_CLEANUPGCCOUTPUT_H
7#define LLVM_TRANSFORMS_CLEANUPGCCOUTPUT_H
8
9#include "llvm/Analysis/FindUsedTypes.h"
10
11class CleanupGCCOutput : public MethodPass {
12  FindUsedTypes FUT;      // Use FUT to eliminate type names that are never used
13public:
14
15  // PatchUpMethodReferences - This is a part of the functionality exported by
16  // the CleanupGCCOutput pass.  This causes functions with different signatures
17  // to be linked together if they have the same name.
18  //
19  static bool PatchUpMethodReferences(Module *M);
20
21  // doPassInitialization - For this pass, it removes global symbol table
22  // entries for primitive types.  These are never used for linking in GCC and
23  // they make the output uglier to look at, so we nuke them.
24  //
25  // Also, initialize instance variables.
26  //
27  bool doInitialization(Module *M);
28
29  // doPerMethodWork - This method simplifies the specified method hopefully.
30  //
31  bool runOnMethod(Method *M);
32
33  // doPassFinalization - Strip out type names that are unused by the program
34  bool doFinalization(Module *M);
35};
36
37#endif
38