Skip to content

Commit

Permalink
Kill LLVMAddTargetData
Browse files Browse the repository at this point in the history
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
  • Loading branch information
deadalnix committed Feb 16, 2016
1 parent d964cf3 commit d0aed13
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 19 deletions.
1 change: 0 additions & 1 deletion bindings/go/llvm/executionengine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ func TestFactorial(t *testing.T) {
pass := NewPassManager()
defer pass.Dispose()

pass.Add(engine.TargetData())
pass.AddConstantPropagationPass()
pass.AddInstructionCombiningPass()
pass.AddPromoteMemoryToRegisterPass()
Expand Down
7 changes: 0 additions & 7 deletions bindings/go/llvm/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions include/llvm-c/Target.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
3 changes: 0 additions & 3 deletions lib/Target/Target.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
Expand Down
3 changes: 0 additions & 3 deletions unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ class MCJITCAPITest : public testing::Test, public MCJITTestAPICommon {

void buildAndRunPasses() {
LLVMPassManagerRef pass = LLVMCreatePassManager();
LLVMAddTargetData(LLVMGetExecutionEngineTargetData(Engine), pass);
LLVMAddConstantPropagationPass(pass);
LLVMAddInstructionCombiningPass(pass);
LLVMRunPassManager(pass, Module);
Expand All @@ -304,8 +303,6 @@ class MCJITCAPITest : public testing::Test, public MCJITTestAPICommon {
LLVMPassManagerRef modulePasses =
LLVMCreatePassManager();

LLVMAddTargetData(LLVMGetExecutionEngineTargetData(Engine), modulePasses);

LLVMPassManagerBuilderPopulateFunctionPassManager(passBuilder,
functionPasses);
LLVMPassManagerBuilderPopulateModulePassManager(passBuilder, modulePasses);
Expand Down

0 comments on commit d0aed13

Please sign in to comment.