Revert "Expose a TargetMachine::getTargetTransformInfo function"

This reverts commit r321234.  It breaks the -DBUILD_SHARED_LIBS=ON build.

llvm-svn: 321243
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp
index c4c0dd2..ad63c7a 100644
--- a/llvm/lib/Target/TargetMachine.cpp
+++ b/llvm/lib/Target/TargetMachine.cpp
@@ -219,8 +219,10 @@
 
 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 @@
   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); });
-}