IPO.h revision 407c25bd826364e3fcc67549d94044f84d90ad2f
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/Pass.h" 10 11class CleanupGCCOutput : public Pass { 12 Method *Malloc, *Free; // Pointers to external declarations, or null if none 13public: 14 15 inline CleanupGCCOutput() : Malloc(0), Free(0) {} 16 17 // PatchUpMethodReferences - This is a part of the functionality exported by 18 // the CleanupGCCOutput pass. This causes functions with different signatures 19 // to be linked together if they have the same name. 20 // 21 static bool PatchUpMethodReferences(Module *M); 22 23 // doPassInitialization - For this pass, it removes global symbol table 24 // entries for primitive types. These are never used for linking in GCC and 25 // they make the output uglier to look at, so we nuke them. 26 // 27 // Also, initialize instance variables. 28 // 29 bool doPassInitialization(Module *M); 30 31 // doPerMethodWork - This method simplifies the specified method hopefully. 32 // 33 bool doPerMethodWork(Method *M); 34private: 35 bool doOneCleanupPass(Method *M); 36}; 37 38#endif 39