aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/TraceValues.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-29 17:27:38 +0000
committerChris Lattner <sabre@nondot.org>2001-10-29 17:27:38 +0000
commit111bd01c11752479de119f8bf961ba2b1960b7ca (patch)
treed2ff4a9179e62d2f3813c1a7320681b04ca22f51 /lib/Transforms/Instrumentation/TraceValues.cpp
parent43a6f2e332eb54796a2e85188aa89c0dfee03ef3 (diff)
Fix broken assertion. Didn't allow for pointer case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1034 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/TraceValues.cpp')
-rw-r--r--lib/Transforms/Instrumentation/TraceValues.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Transforms/Instrumentation/TraceValues.cpp b/lib/Transforms/Instrumentation/TraceValues.cpp
index 66f381e469..3547b298c1 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<PointerType>(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;