Skip to content

Commit a9b10e1

Browse files
Jay-Jiewu-Luigcbot
authored andcommitted
Fix a llvm complain about members of llvm.used must be named
1 parent 982ef78 commit a9b10e1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

IGC/Compiler/CISACodeGen/helper.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2023,6 +2023,10 @@ namespace IGC
20232023
Type* Int8PtrTy = llvm::Type::getInt8PtrTy(M.getContext());
20242024
for (auto* V : Values) {
20252025
Constant* C = V;
2026+
//llvm will complain if members of llvm.uses doesn't have a name
2027+
if(C->getName().empty())
2028+
C->setName("gVar");
2029+
20262030
if (V->getType()->getAddressSpace() != 0)
20272031
C = ConstantExpr::getAddrSpaceCast(V, Int8PtrTy);
20282032
else

0 commit comments

Comments
 (0)