Merge pull request #486 from jbrodman/master

Add check for Enum type in Assert
This commit is contained in:
jbrodman
2013-04-30 13:12:46 -07:00

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;