summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit58df27cb2e4d7768356c94f13d6d7dc16e43a6ab (patch)
tree609f89234ed1536419ccb730483542eeb6e92817 /llvm/lib/VMCore/TargetTransformInfo.cpp
parent118fafa301ba55a5c1d4bc851277d1769083f0a2 (diff)
downloadbcm5719-llvm-58df27cb2e4d7768356c94f13d6d7dc16e43a6ab.tar.gz
bcm5719-llvm-58df27cb2e4d7768356c94f13d6d7dc16e43a6ab.zip
Add a comment which explains why the assert fired and how to fix it.
llvm-svn: 166467
Diffstat (limited to 'llvm/lib/VMCore/TargetTransformInfo.cpp')
-rw-r--r--llvm/lib/VMCore/TargetTransformInfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/TargetTransformInfo.cpp b/llvm/lib/VMCore/TargetTransformInfo.cpp
index 3af0222a211..219d24c1f56 100644
--- a/llvm/lib/VMCore/TargetTransformInfo.cpp
+++ b/llvm/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?");
}
OpenPOWER on IntegriCloud