[llvm-commits] [llvm] r166467 - /llvm/trunk/lib/VMCore/TargetTransformInfo.cpp
Nadav Rotem
nrotem at apple.com
Mon Oct 22 21:35:40 PDT 2012
Author: nadav
Date: Mon Oct 22 23:35:40 2012
New Revision: 166467
URL: http://llvm.org/viewvc/llvm-project?rev=166467&view=rev
Log:
Add a comment which explains why the assert fired and how to fix it.
Modified:
llvm/trunk/lib/VMCore/TargetTransformInfo.cpp
Modified: llvm/trunk/lib/VMCore/TargetTransformInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/TargetTransformInfo.cpp?rev=166467&r1=166466&r2=166467&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/TargetTransformInfo.cpp (original)
+++ llvm/trunk/lib/VMCore/TargetTransformInfo.cpp Mon Oct 22 23:35:40 2012
@@ -17,6 +17,10 @@
/// @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?");
}
More information about the llvm-commits
mailing list