summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetMachine.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2017-12-21 02:34:39 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2017-12-21 02:34:39 +0000
commit747d1114d6fab9b807764b790e51482fa8326ea0 (patch)
tree1fa6ba900d84c302b575e56041314a405659aad0 /llvm/lib/Target/TargetMachine.cpp
parentb6a429842ec31acddbc64937a8b7047c4eee025e (diff)
downloadbcm5719-llvm-747d1114d6fab9b807764b790e51482fa8326ea0.tar.gz
bcm5719-llvm-747d1114d6fab9b807764b790e51482fa8326ea0.zip
Revert "Expose a TargetMachine::getTargetTransformInfo function"
This reverts commit r321234. It breaks the -DBUILD_SHARED_LIBS=ON build. llvm-svn: 321243
Diffstat (limited to 'llvm/lib/Target/TargetMachine.cpp')
-rw-r--r--llvm/lib/Target/TargetMachine.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp
index c4c0dd22ee0..ad63c7a9cb3 100644
--- a/llvm/lib/Target/TargetMachine.cpp
+++ b/llvm/lib/Target/TargetMachine.cpp
@@ -219,8 +219,10 @@ CodeGenOpt::Level TargetMachine::getOptLevel() const { return OptLevel; }
void TargetMachine::setOptLevel(CodeGenOpt::Level Level) { OptLevel = Level; }
-TargetTransformInfo TargetMachine::getTargetTransformInfo(const Function &F) {
- return TargetTransformInfo(F.getParent()->getDataLayout());
+TargetIRAnalysis TargetMachine::getTargetIRAnalysis() {
+ return TargetIRAnalysis([](const Function &F) {
+ return TargetTransformInfo(F.getParent()->getDataLayout());
+ });
}
void TargetMachine::getNameWithPrefix(SmallVectorImpl<char> &Name,
@@ -242,10 +244,3 @@ MCSymbol *TargetMachine::getSymbol(const GlobalValue *GV) const {
getNameWithPrefix(NameStr, GV, TLOF->getMangler());
return TLOF->getContext().getOrCreateSymbol(NameStr);
}
-
-TargetIRAnalysis TargetMachine::getTargetIRAnalysis() {
- // Since Analysis can't depend on Target, use a std::function to invert the
- // dependency.
- return TargetIRAnalysis(
- [this](const Function &F) { return this->getTargetTransformInfo(F); });
-}
OpenPOWER on IntegriCloud