mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Fix assertion failure in LLParser::ConvertValIDToValue
Summary: Fixes bug 24645. Problem appears to be that the type may be undefined when ConvertValIDToValue is called. Reviewers: kcc Subscribers: llvm-commits llvm-svn: 246779
This commit is contained in:
parent
80ea68ccb9
commit
d5e1ad2457
@ -4128,8 +4128,7 @@ bool LLParser::ConvertValIDToValue(Type *Ty, ValID &ID, Value *&V,
|
||||
V = PFS->GetVal(ID.StrVal, Ty, ID.Loc, OC);
|
||||
return V == nullptr;
|
||||
case ValID::t_InlineAsm: {
|
||||
assert(ID.FTy);
|
||||
if (!InlineAsm::Verify(ID.FTy, ID.StrVal2))
|
||||
if (!ID.FTy || !InlineAsm::Verify(ID.FTy, ID.StrVal2))
|
||||
return Error(ID.Loc, "invalid type for inline asm constraint string");
|
||||
V = InlineAsm::get(ID.FTy, ID.StrVal, ID.StrVal2, ID.UIntVal & 1,
|
||||
(ID.UIntVal >> 1) & 1,
|
||||
|
@ -59,7 +59,7 @@ namespace llvm {
|
||||
|
||||
LLLexer::LocTy Loc;
|
||||
unsigned UIntVal;
|
||||
FunctionType *FTy;
|
||||
FunctionType *FTy = nullptr;
|
||||
std::string StrVal, StrVal2;
|
||||
APSInt APSIntVal;
|
||||
APFloat APFloatVal{0.0};
|
||||
|
6
test/Assembler/invalid-untyped-metadata.ll
Normal file
6
test/Assembler/invalid-untyped-metadata.ll
Normal file
@ -0,0 +1,6 @@
|
||||
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
|
||||
|
||||
; Tests bug: https://llvm.org/bugs/show_bug.cgi?id=24645
|
||||
; CHECK: error: invalid type for inline asm constraint string
|
||||
|
||||
!3=! {%..d04 *asm" !6!={!H)4" ,""
|
Loading…
x
Reference in New Issue
Block a user