Mercurial > hg > CbC > CbC_llvm
comparison tools/llvm-xray/func-id-helper.h @ 147:c2174574ed3a
LLVM 10
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 14 Aug 2019 16:55:33 +0900 |
parents | 803732b1fca8 |
children |
comparison
equal
deleted
inserted
replaced
134:3a76565eade5 | 147:c2174574ed3a |
---|---|
1 //===- func-id-helper.h - XRay Function ID Conversion Helpers -------------===// | 1 //===- func-id-helper.h - XRay Function ID Conversion Helpers -------------===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 // | 4 // See https://llvm.org/LICENSE.txt for license information. |
5 // This file is distributed under the University of Illinois Open Source | 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 // License. See LICENSE.TXT for details. | |
7 // | 6 // |
8 //===----------------------------------------------------------------------===// | 7 //===----------------------------------------------------------------------===// |
9 // | 8 // |
10 // Defines helper tools dealing with XRay-generated function ids. | 9 // Defines helper tools dealing with XRay-generated function ids. |
11 // | 10 // |
12 //===----------------------------------------------------------------------===// | 11 //===----------------------------------------------------------------------===// |
13 #ifndef LLVM_TOOLS_LLVM_XRAY_FUNC_ID_HELPER_H | 12 #ifndef LLVM_TOOLS_LLVM_XRAY_FUNC_ID_HELPER_H |
14 #define LLVM_TOOLS_LLVM_XRAY_FUNC_ID_HELPER_H | 13 #define LLVM_TOOLS_LLVM_XRAY_FUNC_ID_HELPER_H |
15 | 14 |
15 #include "llvm/ADT/DenseMap.h" | |
16 #include "llvm/DebugInfo/Symbolize/Symbolize.h" | 16 #include "llvm/DebugInfo/Symbolize/Symbolize.h" |
17 #include <unordered_map> | 17 #include <unordered_map> |
18 | 18 |
19 namespace llvm { | 19 namespace llvm { |
20 namespace xray { | 20 namespace xray { |
26 | 26 |
27 private: | 27 private: |
28 std::string BinaryInstrMap; | 28 std::string BinaryInstrMap; |
29 symbolize::LLVMSymbolizer &Symbolizer; | 29 symbolize::LLVMSymbolizer &Symbolizer; |
30 const FunctionAddressMap &FunctionAddresses; | 30 const FunctionAddressMap &FunctionAddresses; |
31 mutable llvm::DenseMap<int32_t, std::string> CachedNames; | |
31 | 32 |
32 public: | 33 public: |
33 FuncIdConversionHelper(std::string BinaryInstrMap, | 34 FuncIdConversionHelper(std::string BinaryInstrMap, |
34 symbolize::LLVMSymbolizer &Symbolizer, | 35 symbolize::LLVMSymbolizer &Symbolizer, |
35 const FunctionAddressMap &FunctionAddresses) | 36 const FunctionAddressMap &FunctionAddresses) |