mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 12:16:49 +00:00
[MTE] [NFC] use vector to collect globals to tag (#120283)
The same pattern caused test failures in the HWASan pass, so is brittle. Let's go for the easier approach.
This commit is contained in:
parent
e532241b02
commit
d9703501b0
@ -2444,11 +2444,14 @@ bool AsmPrinter::doFinalization(Module &M) {
|
||||
// we can conditionalize accesses based on whether or not it is nullptr.
|
||||
MF = nullptr;
|
||||
|
||||
for (GlobalVariable &G : make_early_inc_range(M.globals())) {
|
||||
std::vector<GlobalVariable *> GlobalsToTag;
|
||||
for (GlobalVariable &G : M.globals()) {
|
||||
if (G.isDeclaration() || !G.isTagged())
|
||||
continue;
|
||||
tagGlobalDefinition(M, &G);
|
||||
GlobalsToTag.push_back(&G);
|
||||
}
|
||||
for (GlobalVariable *G : GlobalsToTag)
|
||||
tagGlobalDefinition(M, G);
|
||||
|
||||
// Gather all GOT equivalent globals in the module. We really need two
|
||||
// passes over the globals: one to compute and another to avoid its emission
|
||||
|
Loading…
x
Reference in New Issue
Block a user