blob: 209e1dba8f24ac4fc3311db3b0585aecc7c44755 [file] [log] [blame]
Chandler Carruthc2c50cd2013-01-02 09:10:48 +00001//===- llvm/IR/TargetTransformInfo.cpp --------------------------*- C++ -*-===//
Nadav Rotemcbd9a192012-10-18 23:22:48 +00002//
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
13using 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.
19TargetTransformInfo::TargetTransformInfo() : ImmutablePass(ID) {
Nadav Rotemc97410e2012-10-23 04:35:40 +000020 /// 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.
Nadav Rotemcbd9a192012-10-18 23:22:48 +000024 report_fatal_error("Bad TargetTransformInfo ctor used. "
25 "Tool did not specify a TargetTransformInfo to use?");
26}
27
Benjamin Kramer276c43f2012-10-26 18:46:15 +000028INITIALIZE_PASS(TargetTransformInfo, "targettransforminfo",
Nadav Rotemcbd9a192012-10-18 23:22:48 +000029 "Target Transform Info", false, true)
30char TargetTransformInfo::ID = 0;
31