forked from OSchip/llvm-project
C API: Remove LLVMGetDataLayout that was deprecated in 3.7
From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 260657
This commit is contained in:
parent
802f19a170
commit
f71d653879
|
@ -37,7 +37,8 @@ Non-comprehensive list of changes in this release
|
||||||
|
|
||||||
* .. note about C API functions LLVMLinkModules, LLVMParseBitcode,
|
* .. note about C API functions LLVMLinkModules, LLVMParseBitcode,
|
||||||
LLVMParseBitcodeInContext, LLVMGetBitcodeModuleInContext and
|
LLVMParseBitcodeInContext, LLVMGetBitcodeModuleInContext and
|
||||||
LLVMGetBitcodeModule having been removed.
|
LLVMGetBitcodeModule having been removed. LLVMGetTargetMachineData has been
|
||||||
|
removed (use LLVMGetDataLayout instead).
|
||||||
|
|
||||||
.. NOTE
|
.. NOTE
|
||||||
For small 1-3 sentence descriptions, just add an entry at the end of
|
For small 1-3 sentence descriptions, just add an entry at the end of
|
||||||
|
|
|
@ -103,11 +103,6 @@ protected: // Can only create subclasses.
|
||||||
unsigned RequireStructuredCFG : 1;
|
unsigned RequireStructuredCFG : 1;
|
||||||
unsigned O0WantsFastISel : 1;
|
unsigned O0WantsFastISel : 1;
|
||||||
|
|
||||||
/// This API is here to support the C API, deprecated in 3.7 release.
|
|
||||||
/// This should never be used outside of legacy existing client.
|
|
||||||
const DataLayout &getDataLayout() const { return DL; }
|
|
||||||
friend struct C_API_PRIVATE_ACCESS;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
mutable TargetOptions Options;
|
mutable TargetOptions Options;
|
||||||
|
|
||||||
|
|
|
@ -32,15 +32,6 @@
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace llvm {
|
|
||||||
// Friend to the TargetMachine, access legacy API that are made private in C++
|
|
||||||
struct C_API_PRIVATE_ACCESS {
|
|
||||||
static const DataLayout &getDataLayout(const TargetMachine &T) {
|
|
||||||
return T.getDataLayout();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
static TargetMachine *unwrap(LLVMTargetMachineRef P) {
|
static TargetMachine *unwrap(LLVMTargetMachineRef P) {
|
||||||
return reinterpret_cast<TargetMachine *>(P);
|
return reinterpret_cast<TargetMachine *>(P);
|
||||||
}
|
}
|
||||||
|
@ -175,11 +166,6 @@ char* LLVMGetTargetMachineFeatureString(LLVMTargetMachineRef T) {
|
||||||
return strdup(StringRep.c_str());
|
return strdup(StringRep.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Deprecated: use LLVMGetDataLayout(LLVMModuleRef M) instead. */
|
|
||||||
LLVMTargetDataRef LLVMGetTargetMachineData(LLVMTargetMachineRef T) {
|
|
||||||
return wrap(&C_API_PRIVATE_ACCESS::getDataLayout(*unwrap(T)));
|
|
||||||
}
|
|
||||||
|
|
||||||
void LLVMSetTargetMachineAsmVerbosity(LLVMTargetMachineRef T,
|
void LLVMSetTargetMachineAsmVerbosity(LLVMTargetMachineRef T,
|
||||||
LLVMBool VerboseAsm) {
|
LLVMBool VerboseAsm) {
|
||||||
unwrap(T)->Options.MCOptions.AsmVerbose = VerboseAsm;
|
unwrap(T)->Options.MCOptions.AsmVerbose = VerboseAsm;
|
||||||
|
|
Loading…
Reference in New Issue