]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - contrib/llvm/lib/VMCore/TargetTransformInfo.cpp
MFC r244628:
[FreeBSD/stable/9.git] / contrib / llvm / lib / VMCore / TargetTransformInfo.cpp
1 //===- llvm/VMCore/TargetTransformInfo.cpp ----------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #include "llvm/TargetTransformInfo.h"
11 #include "llvm/Support/ErrorHandling.h"
12
13 using namespace llvm;
14
15 /// Default ctor.
16 ///
17 /// @note This has to exist, because this is a pass, but it should never be
18 /// used.
19 TargetTransformInfo::TargetTransformInfo() : ImmutablePass(ID) {
20   /// You are seeing this error because your pass required the TTI
21   /// using a call to "getAnalysis<TargetTransformInfo>()", and you did
22   /// not initialize a machine target which can provide the TTI.
23   /// You should use "getAnalysisIfAvailable<TargetTransformInfo>()" instead.
24   report_fatal_error("Bad TargetTransformInfo ctor used.  "
25                      "Tool did not specify a TargetTransformInfo to use?");
26 }
27
28 INITIALIZE_PASS(TargetTransformInfo, "targettransforminfo",
29                 "Target Transform Info", false, true)
30 char TargetTransformInfo::ID = 0;
31