aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/Disassembler.h
blob: 6d1cc0fdcb50c3eb6608958466a7f023fe05c2f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//===- llvm/Support/Disassembler.h ------------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file implements the necessary glue to call external disassembler
// libraries.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_SYSTEM_DISASSEMBLER_H
#define LLVM_SYSTEM_DISASSEMBLER_H

#include "llvm/Support/DataTypes.h"
#include <string>

namespace llvm {
namespace sys {

/// This function returns true, if there is possible to use some external
/// disassembler library. False otherwise.
bool hasDisassembler();

/// This function provides some "glue" code to call external disassembler
/// libraries.
std::string disassembleBuffer(uint8_t* start, size_t length, uint64_t pc = 0);

}
}

#endif // LLVM_SYSTEM_DISASSEMBLER_H