Skip to content

Commit 53f3084

Browse files
authored
DXIL: Use correct type ID when writing ValueAsMetadata.
1 parent 9372e1a commit 53f3084

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,7 @@ void DXILBitcodeWriter::writeValueAsMetadata(
13481348
Ty = TypedPointerType::get(F->getFunctionType(), F->getAddressSpace());
13491349
else if (GlobalVariable *GV = dyn_cast<GlobalVariable>(V))
13501350
Ty = TypedPointerType::get(GV->getValueType(), GV->getAddressSpace());
1351-
Record.push_back(getTypeID(Ty));
1351+
Record.push_back(getTypeID(Ty, V));
13521352
Record.push_back(VE.getValueID(V));
13531353
Stream.EmitRecord(bitc::METADATA_VALUE, Record, 0);
13541354
Record.clear();

0 commit comments

Comments
 (0)