aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenABITypes.cpp
diff options
context:
space:
mode:
authorMark Lacey <mark.lacey@apple.com>2013-12-05 01:23:01 +0000
committerMark Lacey <mark.lacey@apple.com>2013-12-05 01:23:01 +0000
commitb8f3702eecd7d67c458fcee9a399a65128787e64 (patch)
treede530f53654fd1e74c4bed73bf8d995ab72d2dbe /lib/CodeGen/CodeGenABITypes.cpp
parentcf1b10a63b988bdc4c2c58457b096599577537c2 (diff)
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
Diffstat (limited to 'lib/CodeGen/CodeGenABITypes.cpp')
-rw-r--r--lib/CodeGen/CodeGenABITypes.cpp9
1 files changed, 5 insertions, 4 deletions
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;
}