Skip to content

Commit 94530c7

Browse files
author
Zak Kent
committed
[NFC] [Immediate] Lazily materialize global values
1 parent bd618f1 commit 94530c7

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

lib/Immediate/Immediate.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -554,14 +554,10 @@ class SILMaterializationUnit : public llvm::orc::MaterializationUnit {
554554
// Now we must register all other public symbols defined by
555555
// the module with the JIT
556556
llvm::orc::SymbolFlagsMap Symbols;
557-
// Register all global objects, including global
557+
// Register all global values, including global
558558
// variables and functions
559-
for (const auto &Global : Module->global_objects()) {
560-
addGlobal(Symbols, Global);
561-
}
562-
// Register all global aliases
563-
for (const auto &Global : Module->aliases()) {
564-
addGlobal(Symbols, Global);
559+
for (const auto &GV : Module->global_values()) {
560+
addGlobal(Symbols, GV);
565561
}
566562
// Register the symbols we have discovered with the JIT
567563
if (auto Err = R->defineMaterializing(Symbols)) {

0 commit comments

Comments
 (0)