Skip to content

Commit 1cd3745

Browse files
bors[bot]ptersilie
andauthored
78: Fix checking name of struct literals in shadow stack pass. r=ltratt a=ptersilie Co-authored-by: Lukas Diekmann <[email protected]>
2 parents 30bb5f1 + 9384136 commit 1cd3745

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

llvm/lib/Transforms/Yk/ShadowStack.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,11 @@ class YkShadowStack : public ModulePass {
134134
// a name given by LLVM which could theoretically change. Luckily,
135135
// this should all go away once we only move variables to the
136136
// shadowstack that have their reference taken.
137-
if (ST->getName() == "YkCtrlPointVars" ||
138-
ST->getName() == "struct.YkLocation") {
139-
continue;
137+
if (!ST->isLiteral()) {
138+
if (ST->getName() == "YkCtrlPointVars" ||
139+
ST->getName() == "struct.YkLocation") {
140+
continue;
141+
}
140142
}
141143
}
142144
Builder.SetInsertPoint(&I);

0 commit comments

Comments
 (0)