From 37164a34d5387ba223642a8445fbbd0f583d7b85 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 29 Oct 2001 17:27:38 +0000 Subject: [PATCH] Fix broken assertion. Didn't allow for pointer case llvm-svn: 1034 --- lib/Transforms/Instrumentation/TraceValues.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/Transforms/Instrumentation/TraceValues.cpp b/lib/Transforms/Instrumentation/TraceValues.cpp index 66f381e4698..3547b298c16 100644 --- a/lib/Transforms/Instrumentation/TraceValues.cpp +++ b/lib/Transforms/Instrumentation/TraceValues.cpp @@ -60,7 +60,6 @@ PrintMethodNameForType(const Type* type) case Type::FloatTyID: return "printFloat"; case Type::DoubleTyID: return "printDouble"; case Type::PointerTyID: return "printPointer"; - case Type::MethodTyID: return "printPointer"; default: assert(0 && "Unsupported type for printing"); return NULL; @@ -270,11 +269,9 @@ InsertPrintInsts(Value *Val, { const Type* ValTy = Val->getType(); - assert(ValTy->isPrimitiveType() && - ValTy->getPrimitiveID() != Type::VoidTyID && - ValTy->getPrimitiveID() != Type::TypeTyID && - ValTy->getPrimitiveID() != Type::LabelTyID && - "Unsupported type for printing"); + assert((ValTy->isPrimitiveType() || isa(ValTy)) && + ValTy != Type::VoidTy && ValTy != Type::TypeTy && + ValTy != Type::LabelTy && "Unsupported type for printing"); const Value* scopeToUse = isMethodExit ? (const Value*)BB->getParent() : (const Value*)BB;