aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/CBackend/Writer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-06-25 02:48:37 +0000
committerChris Lattner <sabre@nondot.org>2005-06-25 02:48:37 +0000
commit0431c96cec9576611f06c513d6adcab0f950c18c (patch)
treef171a42cc9f00ad1bf9f6d7468156123017fce64 /lib/Target/CBackend/Writer.cpp
parent11f14c8be0946a8fb95189156ff1d64a01ff7da3 (diff)
Refactor the addPassesToEmitAssembly interface into a addPassesToEmitFile
interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22282 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CBackend/Writer.cpp')
-rw-r--r--lib/Target/CBackend/Writer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp
index c30b306483..f821a77caa 100644
--- a/lib/Target/CBackend/Writer.cpp
+++ b/lib/Target/CBackend/Writer.cpp
@@ -1725,7 +1725,10 @@ void CWriter::visitVAArgInst(VAArgInst &I) {
// External Interface declaration
//===----------------------------------------------------------------------===//
-bool CTargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &o) {
+bool CTargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &o,
+ CodeGenFileType FileType) {
+ if (FileType != TargetMachine::AssemblyFile) return true;
+
PM.add(createLowerGCPass());
PM.add(createLowerAllocationsPass(true));
PM.add(createLowerInvokePass());
@@ -1733,5 +1736,3 @@ bool CTargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &o) {
PM.add(new CWriter(o, getIntrinsicLowering()));
return false;
}
-
-// vim: sw=2