aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-28 18:12:41 +0000
committerChris Lattner <sabre@nondot.org>2009-02-28 18:12:41 +0000
commit8100d38cfab4874ff1676b37529abc281c8665c0 (patch)
tree325e0094a2b20bf8afb91c730cbe76ed8ea68f00
parent0948271ae38e032e8521e536ab54c8ef145dcd4f (diff)
downloadexternal_llvm-8100d38cfab4874ff1676b37529abc281c8665c0.zip
external_llvm-8100d38cfab4874ff1676b37529abc281c8665c0.tar.gz
external_llvm-8100d38cfab4874ff1676b37529abc281c8665c0.tar.bz2
reject 0 element vectors with:
@a = internal constant void bitcast(<0 x i8> <> to void) ^ Fixes PR3685 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65698 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/AsmParser/LLParser.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp
index abddc59..85b4966 100644
--- a/lib/AsmParser/LLParser.cpp
+++ b/lib/AsmParser/LLParser.cpp
@@ -1262,6 +1262,8 @@ bool LLParser::ParseArrayVectorType(PATypeHolder &Result, bool isVector) {
return true;
if (isVector) {
+ if (Size == 0)
+ return Error(SizeLoc, "zero element vector is illegal");
if ((unsigned)Size != Size)
return Error(SizeLoc, "size too large for vector");
if (!EltTy->isFloatingPoint() && !EltTy->isInteger())