mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 00:24:26 +00:00
-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:
@ -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);
|
||||
};
|
||||
|
Reference in New Issue
Block a user