mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-25 21:16:19 +00:00
Check for null MDNode element while printing comment.
llvm-svn: 83172
This commit is contained in:
parent
44b5a5a58c
commit
43ce9e3e75
@ -874,7 +874,7 @@ static void WriteMDNodeComment(const MDNode *Node,
|
||||
formatted_raw_ostream &Out) {
|
||||
if (Node->getNumElements() < 1)
|
||||
return;
|
||||
ConstantInt *CI = dyn_cast<ConstantInt>(Node->getElement(0));
|
||||
ConstantInt *CI = dyn_cast_or_null<ConstantInt>(Node->getElement(0));
|
||||
if (!CI) return;
|
||||
unsigned Val = CI->getZExtValue();
|
||||
unsigned Tag = Val & ~LLVMDebugVersionMask;
|
||||
|
Loading…
Reference in New Issue
Block a user