From 5590967610afa5fcc79386e08acc4d0fad5b6b9f Mon Sep 17 00:00:00 2001 From: Amaury Sechet Date: Tue, 16 Feb 2016 05:11:24 +0000 Subject: Restore the capability to manipulate datalayout from the C API Summary: This consist in variosu addition to the C API: LLVMTargetDataRef LLVMGetModuleDataLayout(LLVMModuleRef M); void LLVMSetModuleDataLayout(LLVMModuleRef M, LLVMTargetDataRef DL); LLVMTargetDataRef LLVMCreateTargetMachineData(LLVMTargetMachineRef T); Reviewers: joker.eph, Wallbraker, echristo Subscribers: axw Differential Revision: http://reviews.llvm.org/D17255 llvm-svn: 260936 --- llvm/lib/Target/TargetMachineC.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/Target/TargetMachineC.cpp') diff --git a/llvm/lib/Target/TargetMachineC.cpp b/llvm/lib/Target/TargetMachineC.cpp index 9405ba7f295..208c59c5f47 100644 --- a/llvm/lib/Target/TargetMachineC.cpp +++ b/llvm/lib/Target/TargetMachineC.cpp @@ -171,6 +171,10 @@ void LLVMSetTargetMachineAsmVerbosity(LLVMTargetMachineRef T, unwrap(T)->Options.MCOptions.AsmVerbose = VerboseAsm; } +LLVMTargetDataRef LLVMCreateTargetDataLayout(LLVMTargetMachineRef T) { + return wrap(new DataLayout(unwrap(T)->createDataLayout())); +} + static LLVMBool LLVMTargetMachineEmit(LLVMTargetMachineRef T, LLVMModuleRef M, raw_pwrite_stream &OS, LLVMCodeGenFileType codegen, -- cgit v1.2.3