comparison 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
comparison
equal deleted inserted replaced
1286:23b23b74e326 1287:6c8af78364f5
1 #ifndef LDC_PASSES_H 1 #ifndef LDC_PASSES_H
2 #define LDC_PASSES_H 2 #define LDC_PASSES_H
3 3
4 #include "gen/metadata.h"
4 namespace llvm { 5 namespace llvm {
5 class FunctionPass; 6 class FunctionPass;
7 class ModulePass;
6 } 8 }
7 9
8 // Performs simplifications on runtime calls. 10 // Performs simplifications on runtime calls.
9 llvm::FunctionPass* createSimplifyDRuntimeCalls(); 11 llvm::FunctionPass* createSimplifyDRuntimeCalls();
10 llvm::FunctionPass* createGarbageCollect2Stack(); 12 llvm::FunctionPass* createGarbageCollect2Stack();
11 13
14 #ifdef USE_METADATA
15 llvm::ModulePass *createStripMetaData();
16 #endif
17
12 18
13 #endif 19 #endif