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 | 5261c8923f41640d2110da45b3fcbfb7461c4296 (patch) | |
| tree | de676376591d3b8408ce804f09857ca0a895a1fb /llvm | |
| parent | 649d46396fcca26fdd3bdf317a0c7991de32c30c (diff) | |
| download | bcm5719-llvm-5261c8923f41640d2110da45b3fcbfb7461c4296.tar.gz bcm5719-llvm-5261c8923f41640d2110da45b3fcbfb7461c4296.zip | |
allow opaque undefs. This resolves PR3282 and fixes
test/Assembler/2005-05-05-OpaqueUndefValues.ll
llvm-svn: 61719
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 8a686ce2f83..da8cb4da23e 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/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; |

