[PATCH] D85922: [ORC][NFC] Refactor loop to determine name of init symbol in IRMaterializationUnit
Stefan Gränitz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 14 02:35:49 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9a47bcae7c56: [ORC][NFC] Refactor loop to determine name of init symbol in… (authored by sgraenitz).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85922/new/
https://reviews.llvm.org/D85922
Files:
llvm/lib/ExecutionEngine/Orc/Layer.cpp
Index: llvm/lib/ExecutionEngine/Orc/Layer.cpp
===================================================================
--- llvm/lib/ExecutionEngine/Orc/Layer.cpp
+++ llvm/lib/ExecutionEngine/Orc/Layer.cpp
@@ -83,17 +83,14 @@
if (!llvm::empty(getStaticInitGVs(M))) {
size_t Counter = 0;
- while (true) {
+ do {
std::string InitSymbolName;
raw_string_ostream(InitSymbolName)
<< "$." << M.getModuleIdentifier() << ".__inits." << Counter++;
InitSymbol = ES.intern(InitSymbolName);
- if (SymbolFlags.count(InitSymbol))
- continue;
- SymbolFlags[InitSymbol] =
- JITSymbolFlags::MaterializationSideEffectsOnly;
- break;
- }
+ } while (SymbolFlags.count(InitSymbol));
+
+ SymbolFlags[InitSymbol] = JITSymbolFlags::MaterializationSideEffectsOnly;
}
});
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85922.285603.patch
Type: text/x-patch
Size: 870 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200814/f0a01487/attachment.bin>
More information about the llvm-commits
mailing list