view gen/passes/Passes.h @ 1287:6c8af78364f5

There's an issue with LLVM metadata support; it triggers an assert when trying to generate asm for code with metadata globals. This new pass is used as a workaround: it strips metadata from the module before it reaches the code generator. Obviously, this is disabled if LLVM doesn't support metadata.
author Frits van Bommel <fvbommel wxs.nl>
date Sat, 02 May 2009 12:19:43 +0200
parents 91d9386d4a5a
children e109e4031e8a
line wrap: on
line source

#ifndef LDC_PASSES_H
#define LDC_PASSES_H

#include "gen/metadata.h"
namespace llvm {
    class FunctionPass;
    class ModulePass;
}

// Performs simplifications on runtime calls.
llvm::FunctionPass* createSimplifyDRuntimeCalls();
llvm::FunctionPass* createGarbageCollect2Stack();

#ifdef USE_METADATA
llvm::ModulePass *createStripMetaData();
#endif


#endif