summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmaury Sechet <deadalnix@gmail.com>2016-02-16 00:22:02 +0000
committerAmaury Sechet <deadalnix@gmail.com>2016-02-16 00:22:02 +0000
commitd0aed13e567baefdd464676d5e08c0c5ba0630a6 (patch)
treeb56e0dab5a9a47aace0ff84681ce007151fe3674
parentd964cf3e68f59150139ff1beb1d2996e7c27bec3 (diff)
Kill LLVMAddTargetData
Summary: It's red, it's dead. Reviewers: joker.eph, Wallbraker, echristo Subscribers: llvm-commits, axw Differential Revision: http://reviews.llvm.org/D17282 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260919 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--bindings/go/llvm/executionengine_test.go1
-rw-r--r--bindings/go/llvm/target.go7
-rw-r--r--docs/ReleaseNotes.rst2
-rw-r--r--include/llvm-c/Target.h5
-rw-r--r--lib/Target/Target.cpp3
-rw-r--r--unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp3
6 files changed, 2 insertions, 19 deletions
diff --git a/bindings/go/llvm/executionengine_test.go b/bindings/go/llvm/executionengine_test.go
index 2b6a3caff3d..3ca36d04569 100644
--- a/bindings/go/llvm/executionengine_test.go
+++ b/bindings/go/llvm/executionengine_test.go
@@ -81,7 +81,6 @@ func TestFactorial(t *testing.T) {
pass := NewPassManager()
defer pass.Dispose()
- pass.Add(engine.TargetData())
pass.AddConstantPropagationPass()
pass.AddInstructionCombiningPass()
pass.AddPromoteMemoryToRegisterPass()
diff --git a/bindings/go/llvm/target.go b/bindings/go/llvm/target.go
index 314805665c4..5910b9bb924 100644
--- a/bindings/go/llvm/target.go
+++ b/bindings/go/llvm/target.go
@@ -121,13 +121,6 @@ func NewTargetData(rep string) (td TargetData) {
return
}
-// Adds target data information to a pass manager. This does not take ownership
-// of the target data.
-// See the method llvm::PassManagerBase::add.
-func (pm PassManager) Add(td TargetData) {
- C.LLVMAddTargetData(td.C, pm.C)
-}
-
// Converts target data to a target layout string. The string must be disposed
// with LLVMDisposeMessage.
// See the constructor llvm::TargetData::TargetData.
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst
index cf86f445c87..eb4ec2857f6 100644
--- a/docs/ReleaseNotes.rst
+++ b/docs/ReleaseNotes.rst
@@ -42,6 +42,8 @@ Non-comprehensive list of changes in this release
* The C API function LLVMLinkModules has been removed.
+* The C API function LLVMAddTargetData has been removed.
+
.. NOTE
For small 1-3 sentence descriptions, just add an entry at the end of
this list. If your description won't fit comfortably in one bullet
diff --git a/include/llvm-c/Target.h b/include/llvm-c/Target.h
index 24d2cb4c959..2b969e24a18 100644
--- a/include/llvm-c/Target.h
+++ b/include/llvm-c/Target.h
@@ -187,11 +187,6 @@ static inline LLVMBool LLVMInitializeNativeDisassembler(void) {
See the constructor llvm::DataLayout::DataLayout. */
LLVMTargetDataRef LLVMCreateTargetData(const char *StringRep);
-/** Adds target data information to a pass manager. This does not take ownership
- of the target data.
- See the method llvm::PassManagerBase::add. */
-void LLVMAddTargetData(LLVMTargetDataRef TD, LLVMPassManagerRef PM);
-
/** Adds target library information to a pass manager. This does not take
ownership of the target library info.
See the method llvm::PassManagerBase::add. */
diff --git a/lib/Target/Target.cpp b/lib/Target/Target.cpp
index 1b74e8cba4f..51d30679b52 100644
--- a/lib/Target/Target.cpp
+++ b/lib/Target/Target.cpp
@@ -46,9 +46,6 @@ LLVMTargetDataRef LLVMCreateTargetData(const char *StringRep) {
return wrap(new DataLayout(StringRep));
}
-void LLVMAddTargetData(LLVMTargetDataRef TD, LLVMPassManagerRef PM) {
-}
-
void LLVMAddTargetLibraryInfo(LLVMTargetLibraryInfoRef TLI,
LLVMPassManagerRef PM) {
unwrap(PM)->add(new TargetLibraryInfoWrapperPass(*unwrap(TLI)));
diff --git a/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp b/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
index c8c244d22ed..cf63da3a22a 100644
--- a/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
+++ b/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
@@ -285,7 +285,6 @@ protected:
void buildAndRunPasses() {
LLVMPassManagerRef pass = LLVMCreatePassManager();
- LLVMAddTargetData(LLVMGetExecutionEngineTargetData(Engine), pass);
LLVMAddConstantPropagationPass(pass);
LLVMAddInstructionCombiningPass(pass);
LLVMRunPassManager(pass, Module);
@@ -304,8 +303,6 @@ protected:
LLVMPassManagerRef modulePasses =
LLVMCreatePassManager();
- LLVMAddTargetData(LLVMGetExecutionEngineTargetData(Engine), modulePasses);
-
LLVMPassManagerBuilderPopulateFunctionPassManager(passBuilder,
functionPasses);
LLVMPassManagerBuilderPopulateModulePassManager(passBuilder, modulePasses);