From 658dd3486bef539b2015ed68b0b2e432604e31dd Mon Sep 17 00:00:00 2001 From: "james.brodman" Date: Tue, 30 Apr 2013 16:10:57 -0400 Subject: [PATCH] Add check for enum type in Assert. --- ctx.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ctx.cpp b/ctx.cpp index 4d207ee2..1119f819 100644 --- a/ctx.cpp +++ b/ctx.cpp @@ -2906,8 +2906,11 @@ FunctionEmitContext::scatter(llvm::Value *value, llvm::Value *ptr, const PointerType *pt = CastType(valueType); - // And everything should be a pointer or atomic from here on out... - AssertPos(currentPos, pt != NULL || CastType(valueType) != NULL); + // And everything should be a pointer or atomic (or enum) from here on out... + AssertPos(currentPos, + pt != NULL + || CastType(valueType) != NULL + || CastType(valueType) != NULL); llvm::Type *type = value->getType(); const char *funcName = NULL;