Skip to content

Commit 3d2cd67

Browse files
committed
Add comment
Created using spr 1.3.6-beta.1
1 parent 3e2a5ba commit 3d2cd67

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Transforms/IPO/LowerTypeTests.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,9 @@ struct ScopedSaveAliaseesAndUsed {
361361
auto *GV = collectUsedGlobalVariables(M, Vec, CompilerUsed);
362362
if (!GV)
363363
return;
364+
// There's no API to only remove certain array elements from
365+
// llvm.used/llvm.compiler.used, so we remove all of them and add back only
366+
// the non-functions.
364367
GV->eraseFromParent();
365368
auto NonFuncBegin =
366369
std::stable_partition(Vec.begin(), Vec.end(), [](GlobalValue *GV) {

0 commit comments

Comments
 (0)