Skip to content
Permalink
Browse files

getSymbolInfo now returns a const reference

  • Loading branch information...
gcatron committed Mar 15, 2019
1 parent 573ea0b commit ea4eb4227e9d80e7cf342bfd5a53dde6897aab48
Showing with 2 additions and 2 deletions.
  1. +1 −1 include/glow/Backends/BackendUtils.h
  2. +1 −1 lib/Backends/BackendUtils.cpp
@@ -65,7 +65,7 @@ class RuntimeBundle {
/// Helper function, gets offset of \p v.
size_t getValueOffset(const Named *v) const;
/// Helper function, gets symbol info for \p v.
RuntimeSymbolInfo getSymbolInfo(const Named *v) const;
const RuntimeSymbolInfo &getSymbolInfo(const Named *v) const;
/// Get a const reference to the symbol table.
const SymbolTableTy &getSymbolTable() const { return symbolTable_; }
/// At compile time condense constants to a single block of memory.
@@ -73,7 +73,7 @@ size_t glow::runtime::RuntimeBundle::getValueOffset(const Named *v) const {
return it->second.offset;
}

runtime::RuntimeSymbolInfo
const runtime::RuntimeSymbolInfo &
runtime::RuntimeBundle::getSymbolInfo(const Named *v) const {
auto it = symbolTable_.find(std::string(v->getName()));
assert(it != symbolTable_.end() && "Symbol not found.");

0 comments on commit ea4eb42

Please sign in to comment.
You can’t perform that action at this time.