summaryrefslogtreecommitdiff
path: root/lib/IR/TargetTransformInfo.cpp
blob: 209e1dba8f24ac4fc3311db3b0585aecc7c44755 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//===- llvm/IR/TargetTransformInfo.cpp --------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#include "llvm/TargetTransformInfo.h"
#include "llvm/Support/ErrorHandling.h"

using namespace llvm;

/// Default ctor.
///
/// @note This has to exist, because this is a pass, but it should never be
/// used.
TargetTransformInfo::TargetTransformInfo() : ImmutablePass(ID) {
  /// You are seeing this error because your pass required the TTI
  /// using a call to "getAnalysis<TargetTransformInfo>()", and you did
  /// not initialize a machine target which can provide the TTI.
  /// You should use "getAnalysisIfAvailable<TargetTransformInfo>()" instead.
  report_fatal_error("Bad TargetTransformInfo ctor used.  "
                     "Tool did not specify a TargetTransformInfo to use?");
}

INITIALIZE_PASS(TargetTransformInfo, "targettransforminfo",
                "Target Transform Info", false, true)
char TargetTransformInfo::ID = 0;