summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LLVMTargetMachine.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-02-06 22:51:15 +0000
committerAndrew Trick <atrick@apple.com>2012-02-06 22:51:15 +0000
commit34914910f5d2792cd0fb672d92325648aca5f038 (patch)
tree80d3cdd25a8ff646d3dc816ae25d5315ba04bf40 /llvm/lib/CodeGen/LLVMTargetMachine.cpp
parent9e0d377400058c1d82634b52bde5ccee17831531 (diff)
downloadbcm5719-llvm-34914910f5d2792cd0fb672d92325648aca5f038.tar.gz
bcm5719-llvm-34914910f5d2792cd0fb672d92325648aca5f038.zip
Add TargetPassConfig to the PassManager for use inside passes
llvm-svn: 149926
Diffstat (limited to 'llvm/lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r--llvm/lib/CodeGen/LLVMTargetMachine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index b2768d61234..f07a85f39c2 100644
--- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -116,6 +116,8 @@ static MCContext *addPassesToGenerateCode(LLVMTargetMachine *TM,
// Set PassConfig options provided by TargetMachine.
PassConfig->setDisableVerify(DisableVerify);
+ PM.add(PassConfig);
+
PassConfig->addIRPasses();
addPassesToHandleExceptions(TM, PM);
@@ -145,8 +147,6 @@ static MCContext *addPassesToGenerateCode(LLVMTargetMachine *TM,
PassConfig->addMachinePasses();
- delete PassConfig;
-
return Context;
}
OpenPOWER on IntegriCloud