diff options
-rw-r--r-- | llvm/docs/ReleaseNotes.rst | 3 | ||||
-rw-r--r-- | llvm/include/llvm/Target/TargetMachine.h | 5 | ||||
-rw-r--r-- | llvm/lib/Target/TargetMachineC.cpp | 14 |
3 files changed, 2 insertions, 20 deletions
diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst index 0e4cf885f90..b712b955af0 100644 --- a/llvm/docs/ReleaseNotes.rst +++ b/llvm/docs/ReleaseNotes.rst @@ -37,7 +37,8 @@ Non-comprehensive list of changes in this release * .. note about C API functions LLVMLinkModules, LLVMParseBitcode, LLVMParseBitcodeInContext, LLVMGetBitcodeModuleInContext and - LLVMGetBitcodeModule having been removed. + LLVMGetBitcodeModule having been removed. LLVMGetTargetMachineData has been + removed (use LLVMGetDataLayout instead). .. NOTE For small 1-3 sentence descriptions, just add an entry at the end of diff --git a/llvm/include/llvm/Target/TargetMachine.h b/llvm/include/llvm/Target/TargetMachine.h index 4e2e20c0064..db0a841abda 100644 --- a/llvm/include/llvm/Target/TargetMachine.h +++ b/llvm/include/llvm/Target/TargetMachine.h @@ -103,11 +103,6 @@ protected: // Can only create subclasses. unsigned RequireStructuredCFG : 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: mutable TargetOptions Options; diff --git a/llvm/lib/Target/TargetMachineC.cpp b/llvm/lib/Target/TargetMachineC.cpp index f82566c37ba..25bfcbe3a22 100644 --- a/llvm/lib/Target/TargetMachineC.cpp +++ b/llvm/lib/Target/TargetMachineC.cpp @@ -32,15 +32,6 @@ 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) { return reinterpret_cast<TargetMachine *>(P); } @@ -175,11 +166,6 @@ char* LLVMGetTargetMachineFeatureString(LLVMTargetMachineRef T) { 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, LLVMBool VerboseAsm) { unwrap(T)->Options.MCOptions.AsmVerbose = VerboseAsm; |