[llvm-commits] [llvm-gcc-4.2] r57934 - in /llvm-gcc-4.2/trunk/gcc: llvm-backend.cpp llvm-linker-hack.cpp
Daniel Dunbar
daniel at zuster.org
Tue Oct 21 16:34:13 PDT 2008
Author: ddunbar
Date: Tue Oct 21 18:34:13 2008
New Revision: 57934
URL: http://llvm.org/viewvc/llvm-project?rev=57934&view=rev
Log:
Update for PrintModulePass API change.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
llvm-gcc-4.2/trunk/gcc/llvm-linker-hack.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=57934&r1=57933&r2=57934&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Tue Oct 21 18:34:13 2008
@@ -469,7 +469,7 @@
} else if (emit_llvm) {
// Emit an LLVM .ll file to the output. This is used when passed
// -emit-llvm -S to the GCC driver.
- PerModulePasses->add(new PrintModulePass(AsmOutFile));
+ PerModulePasses->add(createPrintModulePass(AsmOutFile));
HasPerModulePasses = true;
} else {
FunctionPassManager *PM;
@@ -656,7 +656,7 @@
if (emit_llvm_bc)
IntermediatePM->add(CreateBitcodeWriterPass(*AsmIntermediateOutStream));
if (emit_llvm)
- IntermediatePM->add(new PrintModulePass(AsmIntermediateOutFile));
+ IntermediatePM->add(createPrintModulePass(AsmIntermediateOutFile));
IntermediatePM->run(*TheModule);
AsmIntermediateOutStream->flush();
fflush(asm_intermediate_out_file);
Modified: llvm-gcc-4.2/trunk/gcc/llvm-linker-hack.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-linker-hack.cpp?rev=57934&r1=57933&r2=57934&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-linker-hack.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-linker-hack.cpp Tue Oct 21 18:34:13 2008
@@ -23,6 +23,7 @@
#include "llvm/Module.h"
#include "llvm/ModuleProvider.h"
#include "llvm/Analysis/Verifier.h"
+#include "llvm/Assembly/PrintModulePass.h"
#include "llvm/Target/TargetMachineRegistry.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/IPO.h"
@@ -86,6 +87,7 @@
llvm::createDeadTypeEliminationPass();
llvm::createLoopDeletionPass();
llvm::createAddReadAttrsPass();
+ llvm::createPrintModulePass(0);
std::string Err;
llvm::TargetMachineRegistry::getClosestStaticTargetForModule(*MP->getModule(),
More information about the llvm-commits
mailing list