mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
AsmParser/Bitcode: Add support for MDLocation
This adds assembly and bitcode support for `MDLocation`. The assembly side is rather big, since this is the first `MDNode` subclass (that isn't `MDTuple`). Part of PR21433. (If you're wondering where the mountains of testcase updates are, we don't need them until I update `DILocation` and `DebugLoc` to actually use this class.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225830 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -282,7 +282,8 @@ static bool isIntOrIntVectorValue(const std::pair<const Value*, unsigned> &V) {
|
||||
return V.first->getType()->isIntOrIntVectorTy();
|
||||
}
|
||||
|
||||
ValueEnumerator::ValueEnumerator(const Module &M) : HasMDString(false) {
|
||||
ValueEnumerator::ValueEnumerator(const Module &M)
|
||||
: HasMDString(false), HasMDLocation(false) {
|
||||
if (shouldPreserveBitcodeUseListOrder())
|
||||
UseListOrders = predictUseListOrder(M);
|
||||
|
||||
@ -547,6 +548,7 @@ void ValueEnumerator::EnumerateMetadata(const Metadata *MD) {
|
||||
EnumerateValue(C->getValue());
|
||||
|
||||
HasMDString |= isa<MDString>(MD);
|
||||
HasMDLocation |= isa<MDLocation>(MD);
|
||||
|
||||
// Replace the dummy ID inserted above with the correct one. MDValueMap may
|
||||
// have changed by inserting operands, so we need a fresh lookup here.
|
||||
|
Reference in New Issue
Block a user