When Intrinsic::getName is constructing names for overloaded intrinsics,
authorDan Gohman <gohman@apple.com>
Mon, 20 Aug 2007 19:23:34 +0000 (19:23 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 20 Aug 2007 19:23:34 +0000 (19:23 +0000)
use the ValueType name instead of the llvm type name, to match what the
verifier expects. For integers these are the same, but for floating-point
values the intrinsics use f32/f64 instead of float/double.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41189 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Function.cpp

index 04541dfbfdc25ccd5c2d1bc5f49d79f3894a9e64..a4bc69b4721d513648aeadf895ffee1cbee6b1b6 100644 (file)
@@ -15,6 +15,7 @@
 #include "llvm/DerivedTypes.h"
 #include "llvm/ParameterAttributes.h"
 #include "llvm/IntrinsicInst.h"
+#include "llvm/CodeGen/ValueTypes.h"
 #include "llvm/Support/LeakDetector.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "SymbolTableListTraitsImpl.h"
@@ -287,7 +288,7 @@ std::string Intrinsic::getName(ID id, const Type **Tys, unsigned numTys) {
   std::string Result(Table[id]);
   for (unsigned i = 0; i < numTys; ++i) 
     if (Tys[i])
-      Result += "." + Tys[i]->getDescription();
+      Result += "." + MVT::getValueTypeString(MVT::getValueType(Tys[i]));
   return Result;
 }