mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 03:25:23 +00:00
IR: Use the new DebugLoc API, NFC
Update lib/IR and lib/Bitcode to use the new `DebugLoc` API. Added an explicit conversion to `bool` (avoiding a conversion to `MDLocation`), since a couple of these use cases need to handle broken code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233585 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -373,12 +373,10 @@ ValueEnumerator::ValueEnumerator(const Module &M)
|
||||
for (unsigned i = 0, e = MDs.size(); i != e; ++i)
|
||||
EnumerateMetadata(MDs[i].second);
|
||||
|
||||
if (!I.getDebugLoc().isUnknown()) {
|
||||
MDNode *Scope, *IA;
|
||||
I.getDebugLoc().getScopeAndInlinedAt(Scope, IA, I.getContext());
|
||||
if (Scope) EnumerateMetadata(Scope);
|
||||
if (IA) EnumerateMetadata(IA);
|
||||
}
|
||||
// Don't enumerate the location directly -- it has a special record
|
||||
// type -- but enumerate its operands.
|
||||
if (MDLocation *L = I.getDebugLoc())
|
||||
EnumerateMDNodeOperands(L);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user