diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2015-03-03 22:01:13 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2015-03-03 22:01:13 +0000 |
commit | 9a9738f6e5ecbd45bb2bc105d37570f045717152 (patch) | |
tree | 607649fe7f2d6f54383c72f31b0b4648c7cca6e7 /llvm/lib/IR/BasicBlock.cpp | |
parent | 1dbe2e3dc4368a1985decfb180bd8e7290cd9f8e (diff) | |
download | bcm5719-llvm-9a9738f6e5ecbd45bb2bc105d37570f045717152.tar.gz bcm5719-llvm-9a9738f6e5ecbd45bb2bc105d37570f045717152.zip |
Remove getDataLayout() from Instruction/GlobalValue/BasicBlock/Function
Summary:
This does not conceptually belongs here. Instead provide a shortcut
getModule() that provides access to the DataLayout.
Reviewers: chandlerc, echristo
Reviewed By: echristo
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8027
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 231147
Diffstat (limited to 'llvm/lib/IR/BasicBlock.cpp')
-rw-r--r-- | llvm/lib/IR/BasicBlock.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/IR/BasicBlock.cpp b/llvm/lib/IR/BasicBlock.cpp index eac7d3afbe5..fe38385d341 100644 --- a/llvm/lib/IR/BasicBlock.cpp +++ b/llvm/lib/IR/BasicBlock.cpp @@ -29,10 +29,6 @@ ValueSymbolTable *BasicBlock::getValueSymbolTable() { return nullptr; } -const DataLayout *BasicBlock::getDataLayout() const { - return getParent()->getDataLayout(); -} - LLVMContext &BasicBlock::getContext() const { return getType()->getContext(); } @@ -117,6 +113,9 @@ void BasicBlock::moveAfter(BasicBlock *MovePos) { getParent()->getBasicBlockList(), this); } +const Module *BasicBlock::getModule() const { + return getParent()->getParent(); +} TerminatorInst *BasicBlock::getTerminator() { if (InstList.empty()) return nullptr; |