diff options
author | Alex Lorenz <arphaman@gmail.com> | 2015-09-09 13:44:33 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2015-09-09 13:44:33 +0000 |
commit | b9224cdb7e559cbc3bbbdc71a3905afb9073231d (patch) | |
tree | d9ebe318fb97e03a6e451a05f814ec692e410a85 /unittests/AsmParser | |
parent | 2993ffe264f23daae31a0bd4846960ee252148ee (diff) |
Fix PR 24633 - Handle undef values when parsing standalone constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247145 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/AsmParser')
-rw-r--r-- | unittests/AsmParser/AsmParserTest.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/unittests/AsmParser/AsmParserTest.cpp b/unittests/AsmParser/AsmParserTest.cpp index ef16eb1cfb38..4189310fda23 100644 --- a/unittests/AsmParser/AsmParserTest.cpp +++ b/unittests/AsmParser/AsmParserTest.cpp @@ -99,6 +99,10 @@ TEST(AsmParserTest, TypeAndConstantValueParsing) { ASSERT_TRUE(V); ASSERT_TRUE(isa<BlockAddress>(V)); + V = parseConstantValue("i8** undef", Error, M); + ASSERT_TRUE(V); + ASSERT_TRUE(isa<UndefValue>(V)); + EXPECT_FALSE(parseConstantValue("duble 3.25", Error, M)); EXPECT_EQ(Error.getMessage(), "expected type"); |