Skip to content

Commit bf5639a

Browse files
committed
Fix CUDA build after D97257
Signed-off-by: Mikhail Lychkov <[email protected]>
1 parent cc7a605 commit bf5639a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

llvm/lib/Target/NVPTX/SYCL/GlobalOffset.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,11 @@ class GlobalOffset : public ModulePass {
321321
assert(NvvmMetadata && "IR compiled to PTX must have nvvm.annotations");
322322

323323
SmallPtrSet<GlobalValue *, 8u> Used;
324-
collectUsedGlobalVariables(M, Used, /*CompilerUsed=*/false);
325-
collectUsedGlobalVariables(M, Used, /*CompilerUsed=*/true);
324+
SmallVector<GlobalValue *, 4> Vec;
325+
collectUsedGlobalVariables(M, Vec, /*CompilerUsed=*/false);
326+
collectUsedGlobalVariables(M, Vec, /*CompilerUsed=*/true);
327+
Used = {Vec.begin(), Vec.end()};
328+
326329
auto HasUseOtherThanLLVMUsed = [&Used](GlobalValue *GV) {
327330
if (GV->use_empty())
328331
return false;

0 commit comments

Comments
 (0)