An alloca's type should be weird things like metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228820
91177308-0d34-0410-b5e6-
96231b3b80d8
if (ParseType(Ty)) return true;
+ if (!PointerType::isValidElementType(Ty))
+ return TokError("pointer to this type is invalid");
+
bool AteExtraComma = false;
if (EatIfPresent(lltok::comma)) {
if (Lex.getKind() == lltok::kw_align) {
--- /dev/null
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
+
+; CHECK: pointer to this type is invalid
+
+define void @test() {
+entry:
+ alloca metadata !{null}
+ ret void
+}