Add check for enum type in Assert.

This commit is contained in:
james.brodman
2013-04-30 16:10:57 -04:00
parent 018e9a12a3
commit 658dd3486b

View File

@@ -2906,8 +2906,11 @@ FunctionEmitContext::scatter(llvm::Value *value, llvm::Value *ptr,
const PointerType *pt = CastType<PointerType>(valueType);
// And everything should be a pointer or atomic from here on out...
AssertPos(currentPos, pt != NULL || CastType<AtomicType>(valueType) != NULL);
// And everything should be a pointer or atomic (or enum) from here on out...
AssertPos(currentPos,
pt != NULL
|| CastType<AtomicType>(valueType) != NULL
|| CastType<EnumType>(valueType) != NULL);
llvm::Type *type = value->getType();
const char *funcName = NULL;