aeubanks created this revision. aeubanks added a reviewer: MaskRay. Herald added a subscriber: ormris. Herald added a reviewer: ctetreau. Herald added a reviewer: ctetreau. Herald added a reviewer: ctetreau. aeubanks requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
To reflect the fact that the new PM is the default now. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D111680 Files: clang/lib/CodeGen/BackendUtil.cpp Index: clang/lib/CodeGen/BackendUtil.cpp =================================================================== --- clang/lib/CodeGen/BackendUtil.cpp +++ clang/lib/CodeGen/BackendUtil.cpp @@ -172,11 +172,11 @@ std::unique_ptr<TargetMachine> TM; + void EmitAssemblyWithLegacyPassManager(BackendAction Action, + std::unique_ptr<raw_pwrite_stream> OS); + void EmitAssembly(BackendAction Action, std::unique_ptr<raw_pwrite_stream> OS); - - void EmitAssemblyWithNewPassManager(BackendAction Action, - std::unique_ptr<raw_pwrite_stream> OS); }; // We need this wrapper to access LangOpts and CGOpts from extension functions @@ -966,8 +966,8 @@ return true; } -void EmitAssemblyHelper::EmitAssembly(BackendAction Action, - std::unique_ptr<raw_pwrite_stream> OS) { +void EmitAssemblyHelper::EmitAssemblyWithLegacyPassManager( + BackendAction Action, std::unique_ptr<raw_pwrite_stream> OS) { TimeRegion Region(CodeGenOpts.TimePasses ? &CodeGenerationTime : nullptr); setCommandLineOpts(CodeGenOpts); @@ -1509,8 +1509,8 @@ /// /// This API is planned to have its functionality finished and then to replace /// `EmitAssembly` at some point in the future when the default switches. -void EmitAssemblyHelper::EmitAssemblyWithNewPassManager( - BackendAction Action, std::unique_ptr<raw_pwrite_stream> OS) { +void EmitAssemblyHelper::EmitAssembly(BackendAction Action, + std::unique_ptr<raw_pwrite_stream> OS) { TimeRegion Region(CodeGenOpts.TimePasses ? &CodeGenerationTime : nullptr); setCommandLineOpts(CodeGenOpts); @@ -1686,8 +1686,8 @@ EmitAssemblyHelper AsmHelper(Diags, HeaderOpts, CGOpts, TOpts, LOpts, M); - if (!CGOpts.LegacyPassManager) - AsmHelper.EmitAssemblyWithNewPassManager(Action, std::move(OS)); + if (CGOpts.LegacyPassManager) + AsmHelper.EmitAssemblyWithLegacyPassManager(Action, std::move(OS)); else AsmHelper.EmitAssembly(Action, std::move(OS));
Index: clang/lib/CodeGen/BackendUtil.cpp =================================================================== --- clang/lib/CodeGen/BackendUtil.cpp +++ clang/lib/CodeGen/BackendUtil.cpp @@ -172,11 +172,11 @@ std::unique_ptr<TargetMachine> TM; + void EmitAssemblyWithLegacyPassManager(BackendAction Action, + std::unique_ptr<raw_pwrite_stream> OS); + void EmitAssembly(BackendAction Action, std::unique_ptr<raw_pwrite_stream> OS); - - void EmitAssemblyWithNewPassManager(BackendAction Action, - std::unique_ptr<raw_pwrite_stream> OS); }; // We need this wrapper to access LangOpts and CGOpts from extension functions @@ -966,8 +966,8 @@ return true; } -void EmitAssemblyHelper::EmitAssembly(BackendAction Action, - std::unique_ptr<raw_pwrite_stream> OS) { +void EmitAssemblyHelper::EmitAssemblyWithLegacyPassManager( + BackendAction Action, std::unique_ptr<raw_pwrite_stream> OS) { TimeRegion Region(CodeGenOpts.TimePasses ? &CodeGenerationTime : nullptr); setCommandLineOpts(CodeGenOpts); @@ -1509,8 +1509,8 @@ /// /// This API is planned to have its functionality finished and then to replace /// `EmitAssembly` at some point in the future when the default switches. -void EmitAssemblyHelper::EmitAssemblyWithNewPassManager( - BackendAction Action, std::unique_ptr<raw_pwrite_stream> OS) { +void EmitAssemblyHelper::EmitAssembly(BackendAction Action, + std::unique_ptr<raw_pwrite_stream> OS) { TimeRegion Region(CodeGenOpts.TimePasses ? &CodeGenerationTime : nullptr); setCommandLineOpts(CodeGenOpts); @@ -1686,8 +1686,8 @@ EmitAssemblyHelper AsmHelper(Diags, HeaderOpts, CGOpts, TOpts, LOpts, M); - if (!CGOpts.LegacyPassManager) - AsmHelper.EmitAssemblyWithNewPassManager(Action, std::move(OS)); + if (CGOpts.LegacyPassManager) + AsmHelper.EmitAssemblyWithLegacyPassManager(Action, std::move(OS)); else AsmHelper.EmitAssembly(Action, std::move(OS));
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits