From b8f3702eecd7d67c458fcee9a399a65128787e64 Mon Sep 17 00:00:00 2001 From: Mark Lacey Date: Thu, 5 Dec 2013 01:23:01 +0000 Subject: Simplify the constructor to CodeGenABITypes. The CodeGenOptions are not used for ABI type selection, so we will just create one with the default constructor (there is a FloatABI option in CodeGenOptions that is passed on to LLVM, but not used in Clang for LLVM IR type generation). We can use the DiagnosticsEngine on the ASTContext rather than making a client pass one in explicitly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196450 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenABITypes.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/CodeGen/CodeGenABITypes.cpp') diff --git a/lib/CodeGen/CodeGenABITypes.cpp b/lib/CodeGen/CodeGenABITypes.cpp index 18c836cf2f..d78b47bfb6 100644 --- a/lib/CodeGen/CodeGenABITypes.cpp +++ b/lib/CodeGen/CodeGenABITypes.cpp @@ -19,21 +19,22 @@ #include "clang/CodeGen/CodeGenABITypes.h" #include "clang/CodeGen/CGFunctionInfo.h" +#include "clang/Frontend/CodeGenOptions.h" #include "CodeGenModule.h" using namespace clang; using namespace CodeGen; CodeGenABITypes::CodeGenABITypes(ASTContext &C, - const CodeGenOptions &CodeGenOpts, llvm::Module &M, - const llvm::DataLayout &TD, - DiagnosticsEngine &Diags) - : CGM(new CodeGen::CodeGenModule(C, CodeGenOpts, M, TD, Diags)) { + const llvm::DataLayout &TD) + : CGO(new CodeGenOptions), + CGM(new CodeGen::CodeGenModule(C, *CGO, M, TD, C.getDiagnostics())) { } CodeGenABITypes::~CodeGenABITypes() { + delete CGO; delete CGM; } -- cgit v1.2.3