SymbolSize.h 962 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- SymbolSize.h ---------------------------------------------*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //
  13. //===----------------------------------------------------------------------===//
  14. #ifndef LLVM_OBJECT_SYMBOLSIZE_H
  15. #define LLVM_OBJECT_SYMBOLSIZE_H
  16. #include "llvm/Object/ObjectFile.h"
  17. namespace llvm {
  18. namespace object {
  19. struct SymEntry {
  20. symbol_iterator I;
  21. uint64_t Address;
  22. unsigned Number;
  23. unsigned SectionID;
  24. };
  25. int compareAddress(const SymEntry *A, const SymEntry *B);
  26. std::vector<std::pair<SymbolRef, uint64_t>>
  27. computeSymbolSizes(const ObjectFile &O);
  28. }
  29. } // namespace llvm
  30. #endif
  31. #ifdef __GNUC__
  32. #pragma GCC diagnostic pop
  33. #endif