HomePhabricator

Fix crash on XCore on unused inline in EmitTargetMetadata

Authored by nigelp-xmos on Jun 24 2020, 12:20 PM.

Description

Fix crash on XCore on unused inline in EmitTargetMetadata

EmitTargetMetadata passed to emitTargetMD a null pointer as returned
from GetGlobalValue, for an unused inline function which has been
removed from the module at that point.

A FIXME in CodeGenModule.cpp commented that the calling code in
EmitTargetMetadata should be moved into the one target that needs it
(XCore). A review comment agreed. So the calling loop has been moved
into the XCore subclass. The check for null is done in that loop.

Differential Revision: https://reviews.llvm.org/D77068

Details

Committed
erichkeaneJun 24 2020, 12:48 PM
Differential Revision
D77068: Fix crash on XCore on unused inline in EmitTargetMetadata
Parents
rG395920a61493: [llvm-objcopy] Update help message tests
Branches
Unknown
Tags
Unknown