Skip to content

Commit

Permalink
Assert symbol name, add comment about symbol naming
Browse files Browse the repository at this point in the history
  • Loading branch information
boomanaiden154 committed Nov 24, 2023
1 parent 9dfa6f5 commit 1408ee2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions llvm/tools/llvm-exegesis/lib/Assembler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,11 @@ Expected<ExecutableFunction> ExecutableFunction::create(
std::unique_ptr<LLVMContext> Ctx = std::make_unique<LLVMContext>();

auto SymbolSizes = object::computeSymbolSizes(*ObjectFileHolder.getBinary());
// Get the size of the function that we want to call into (with the name of
// FunctionID). This should always be the third symbol returned by
// calculateSymbolSizes.
assert(SymbolSizes.size() == 3);
assert(cantFail(std::get<0>(SymbolSizes[2]).getName()) == FunctionID);
uintptr_t CodeSize = std::get<1>(SymbolSizes[2]);

auto EJITOrErr = orc::LLJITBuilder().create();
Expand Down

0 comments on commit 1408ee2

Please sign in to comment.