diff options
author | Chris Lattner <sabre@nondot.org> | 2009-01-05 18:12:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-01-05 18:12:21 +0000 |
commit | 0b6163506359223fb0f74d856099ee4d5e768ebe (patch) | |
tree | 2d546f9dd70fb88ae7d39ce1acdfb366fe330c93 /lib/AsmParser | |
parent | 2c1623ae0b041519fecdfdb97b1bda4708b6aeb6 (diff) | |
download | external_llvm-0b6163506359223fb0f74d856099ee4d5e768ebe.zip external_llvm-0b6163506359223fb0f74d856099ee4d5e768ebe.tar.gz external_llvm-0b6163506359223fb0f74d856099ee4d5e768ebe.tar.bz2 |
allow opaque undefs. This resolves PR3282 and fixes
test/Assembler/2005-05-05-OpaqueUndefValues.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61719 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index 8a686ce..da8cb4d 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -1913,7 +1913,8 @@ bool LLParser::ConvertGlobalValIDToValue(const Type *Ty, ValID &ID, return false; case ValID::t_Undef: // FIXME: LabelTy should not be a first-class type. - if (!Ty->isFirstClassType() || Ty == Type::LabelTy) + if ((!Ty->isFirstClassType() || Ty == Type::LabelTy) && + !isa<OpaqueType>(Ty)) return Error(ID.Loc, "invalid type for undef constant"); V = UndefValue::get(Ty); return false; |