aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/TargetTransformInfo.cpp
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2012-10-23 04:35:40 +0000
committerNadav Rotem <nrotem@apple.com>2012-10-23 04:35:40 +0000
commitc97410eed21948f6ff1caa187e1ad4f924553733 (patch)
tree17a8ba844b5f10684b16242ceb1bf31b69f00dca /lib/VMCore/TargetTransformInfo.cpp
parent293e5d0e0a4abce2c79a6bde338325ca1df0edab (diff)
downloadexternal_llvm-c97410eed21948f6ff1caa187e1ad4f924553733.zip
external_llvm-c97410eed21948f6ff1caa187e1ad4f924553733.tar.gz
external_llvm-c97410eed21948f6ff1caa187e1ad4f924553733.tar.bz2
Add a comment which explains why the assert fired and how to fix it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166467 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/TargetTransformInfo.cpp')
-rw-r--r--lib/VMCore/TargetTransformInfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/VMCore/TargetTransformInfo.cpp b/lib/VMCore/TargetTransformInfo.cpp
index 3af0222..219d24c 100644
--- a/lib/VMCore/TargetTransformInfo.cpp
+++ b/lib/VMCore/TargetTransformInfo.cpp
@@ -17,6 +17,10 @@ using namespace llvm;
/// @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?");
}