mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
IR: Simplify DIBuilder::trackIfUnresolved(), NFC
llvm-svn: 226487
This commit is contained in:
parent
f860907b8f
commit
19ec652214
@ -54,16 +54,14 @@ DIBuilder::DIBuilder(Module &m, bool AllowUnresolvedNodes)
|
||||
DeclareFn(nullptr), ValueFn(nullptr),
|
||||
AllowUnresolvedNodes(AllowUnresolvedNodes) {}
|
||||
|
||||
static bool isUnresolved(MDNode *N) { return N && !N->isResolved(); }
|
||||
|
||||
void DIBuilder::trackIfUnresolved(MDNode *N) {
|
||||
if (!AllowUnresolvedNodes) {
|
||||
assert(!isUnresolved(N) && "Cannot handle unresolved nodes");
|
||||
if (!N)
|
||||
return;
|
||||
}
|
||||
if (isUnresolved(N))
|
||||
UnresolvedNodes.emplace_back(N);
|
||||
return;
|
||||
if (N->isResolved())
|
||||
return;
|
||||
|
||||
assert(AllowUnresolvedNodes && "Cannot handle unresolved nodes");
|
||||
UnresolvedNodes.emplace_back(N);
|
||||
}
|
||||
|
||||
void DIBuilder::finalize() {
|
||||
|
Loading…
Reference in New Issue
Block a user