libabigail/include/abg-ctf-reader.h
Guillermo E. Martinez via Libabigail 7f60fbc96b ctf-reader: Make create_read_context return a smart pointer.
* include/abg-ctf-reader.h (read_context_sptr): New typedef.
	(create_read_context): Use read_context_sptr as return value.
	(read_corpus): New overload that takes a read_context_sptr.
	* src/abg-ctf-reader.cc (create_read_context): Use
	read_context_sptr as return value.
	(read_corpus): New overload that takes a read_context_sptr.
	* tools/abidiff.cc (main): Use read_context_sptr.
	* tools/abidw.cc (load_corpus_and_write_abixml): Adjust call to
	create_read_context.
	* tools/abilint.cc: Likewise.

Signed-off-by: Guillermo E. Martinez <guillermo.e.martinez@oracle.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2021-11-23 15:25:05 +01:00

41 lines
982 B
C++

// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// -*- Mode: C++ -*-
//
// Copyright (C) 2021 Oracle, Inc.
//
// Author: Jose E. Marchesi
/// @file
///
/// This file contains the declarations of the entry points to
/// de-serialize an instance of @ref abigail::corpus from a file in
/// elf format, containing CTF information.
#ifndef __ABG_CTF_READER_H__
#define __ABG_CTF_READER_H__
#include <ostream>
#include "abg-corpus.h"
#include "abg-suppression.h"
#include "abg-elf-reader-common.h"
namespace abigail
{
namespace ctf_reader
{
class read_context;
typedef shared_ptr<read_context> read_context_sptr;
read_context_sptr
create_read_context(const std::string& elf_path,
ir::environment *env);
corpus_sptr
read_corpus(read_context *ctxt, elf_reader::status& status);
corpus_sptr
read_corpus(const read_context_sptr &ctxt, elf_reader::status &status);
} // end namespace ctf_reader
} // end namespace abigail
#endif // ! __ABG_CTF_READER_H__