summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/Orc/Core.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2018-01-06 20:14:22 +0000
committerLang Hames <lhames@gmail.com>2018-01-06 20:14:22 +0000
commit0b93cd7351789911dd13c4f3bfa472be57f4e414 (patch)
tree3adaf7a67982817e02056bda27b6136ced4fd456 /llvm/lib/ExecutionEngine/Orc/Core.cpp
parent80788d8088259ac1550fd619bc3541dd474a6d42 (diff)
downloadbcm5719-llvm-0b93cd7351789911dd13c4f3bfa472be57f4e414.tar.gz
bcm5719-llvm-0b93cd7351789911dd13c4f3bfa472be57f4e414.zip
[ORC] Remove AsynchronousSymbolQuery while I debug an issue on one of the
builders. llvm-svn: 321941
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/Core.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/Orc/Core.cpp84
1 files changed, 0 insertions, 84 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/Core.cpp b/llvm/lib/ExecutionEngine/Orc/Core.cpp
deleted file mode 100644
index e7f13c5c0e7..00000000000
--- a/llvm/lib/ExecutionEngine/Orc/Core.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-//===--------- Core.cpp - Core ORC APIs (SymbolSource, VSO, etc.) ---------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/ExecutionEngine/Orc/Core.h"
-#include "llvm/ExecutionEngine/Orc/OrcError.h"
-
-namespace llvm {
-namespace orc {
-
-AsynchronousSymbolQuery::AsynchronousSymbolQuery(
- const SymbolNameSet &Symbols,
- SymbolsResolvedCallback NotifySymbolsResolved,
- SymbolsReadyCallback NotifySymbolsReady)
- : NotifySymbolsResolved(std::move(NotifySymbolsResolved)),
- NotifySymbolsReady(std::move(NotifySymbolsReady)) {
- assert(this->NotifySymbolsResolved &&
- "Symbols resolved callback must be set");
- assert(this->NotifySymbolsReady && "Symbols ready callback must be set");
- OutstandingResolutions = OutstandingFinalizations = Symbols.size();
-}
-
-void AsynchronousSymbolQuery::setFailed(Error Err) {
- OutstandingResolutions = OutstandingFinalizations = 0;
- if (NotifySymbolsResolved)
- NotifySymbolsResolved(std::move(Err));
- else
- NotifySymbolsReady(std::move(Err));
-}
-
-void AsynchronousSymbolQuery::setDefinition(SymbolStringPtr Name,
- JITSymbol Sym) {
- // If OutstandingResolutions is zero we must have errored out already. Just
- // ignore this.
- if (OutstandingResolutions == 0)
- return;
-
- assert(NotifySymbolsResolved && "Notify callback not set");
-
- errs()
- << "OutstandingResolutions = " << OutstandingResolutions << "\n"
- << "OutstandingFinalizations = " << OutstandingFinalizations << "\n"
- << "Symbols.size() = " << Symbols.size() << "\n"
- << "Symbols.count(Name) = " << Symbols.count(Name) << "\n"
- << "Callback size = " << sizeof(SymbolsResolvedCallback) << "\n"
- << "Callback offset = "
- << (size_t)((char*)&NotifySymbolsResolved - (char*)this) << "\n";
-
- assert(!Symbols.count(Name) &&
- "Symbol has already been assigned an address");
- errs() << "Past assert\n";
- Symbols.insert(std::make_pair(std::move(Name), std::move(Sym)));
- errs() << "Past insert\n";
- --OutstandingResolutions;
- errs() << "Past subtract\n";
- if (OutstandingResolutions == 0) {
- errs() << "Past test\n";
- NotifySymbolsResolved(std::move(Symbols));
- // Null out NotifySymbolsResolved to indicate that we've already called it.
- errs() << "Past callback\n";
- NotifySymbolsResolved = {};
- errs() << "Past callback-reset\n";
- }
-}
-
-void AsynchronousSymbolQuery::notifySymbolFinalized() {
- // If OutstandingFinalizations is zero we must have errored out already. Just
- // ignore this.
- if (OutstandingFinalizations == 0)
- return;
-
- assert(OutstandingFinalizations > 0 && "All symbols already finalized");
- --OutstandingFinalizations;
- if (OutstandingFinalizations == 0)
- NotifySymbolsReady(Error::success());
-}
-
-} // End namespace orc.
-} // End namespace llvm.
OpenPOWER on IntegriCloud