diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-04-20 21:07:34 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-04-20 21:07:34 +0000 |
| commit | 89ee75d7869ffc52cfe5beef45ef701633b8f447 (patch) | |
| tree | c4e2793fc02c52b79ab35521788860afeceef317 /llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h | |
| parent | f54f8ff0945f9405ecb10fb67d0bf2ffab5304fb (diff) | |
| download | llvm-89ee75d7869ffc52cfe5beef45ef701633b8f447.zip llvm-89ee75d7869ffc52cfe5beef45ef701633b8f447.tar.gz llvm-89ee75d7869ffc52cfe5beef45ef701633b8f447.tar.bz2 | |
What year is it! This file has no reason to be written in C, and has doubly no
reason to expose a global symbol 'decodeInstruction' nor to pollute the global
scope with a bunch of external linkage entities (some of which conflict with
others elsewhere in LLVM).
This is just the initial transition to C++; more cleanups to follow.
llvm-svn: 206717
Diffstat (limited to 'llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h')
| -rw-r--r-- | llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h | 49 |
1 files changed, 22 insertions, 27 deletions
diff --git a/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h b/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h index ac3b39df..19455e3 100644 --- a/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h +++ b/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h @@ -1,25 +1,21 @@ -/*===-- X86DisassemblerDecoderInternal.h - Disassembler decoder ---*- C -*-===* - * - * The LLVM Compiler Infrastructure - * - * This file is distributed under the University of Illinois Open Source - * License. See LICENSE.TXT for details. - * - *===----------------------------------------------------------------------===* - * - * This file is part of the X86 Disassembler. - * It contains the public interface of the instruction decoder. - * Documentation for the disassembler can be found in X86Disassembler.h. - * - *===----------------------------------------------------------------------===*/ +//===-- X86DisassemblerDecoderInternal.h - Disassembler decoder -*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file is part of the X86 Disassembler. +// It contains the public interface of the instruction decoder. +// Documentation for the disassembler can be found in X86Disassembler.h. +// +//===----------------------------------------------------------------------===// #ifndef X86DISASSEMBLERDECODER_H #define X86DISASSEMBLERDECODER_H -#ifdef __cplusplus -extern "C" { -#endif - #define INSTRUCTION_SPECIFIER_FIELDS \ uint16_t operands; @@ -31,6 +27,9 @@ extern "C" { #undef INSTRUCTION_SPECIFIER_FIELDS #undef INSTRUCTION_IDS +namespace llvm { +namespace X86Disassembler { + /* * Accessor functions for various fields of an Intel instruction */ @@ -684,21 +683,17 @@ int decodeInstruction(struct InternalInstruction* insn, uint64_t startLoc, DisassemblerMode mode); -/* x86DisassemblerDebug - C-accessible function for printing a message to - * debugs() +/* \brief Debug - Print a message to debugs() * @param file - The name of the file printing the debug message. * @param line - The line number that printed the debug message. * @param s - The message to print. */ -void x86DisassemblerDebug(const char *file, - unsigned line, - const char *s); +void Debug(const char *file, unsigned line, const char *s); -const char *x86DisassemblerGetInstrName(unsigned Opcode, const void *mii); +const char *GetInstrName(unsigned Opcode, const void *mii); -#ifdef __cplusplus -} -#endif +} // namespace X86Disassembler +} // namespace llvm #endif |
