OSDN Git Service

For the 'C' disassembler API, add a new ReferenceType for the
authorKevin Enderby <enderby@apple.com>
Mon, 6 Jan 2014 22:08:08 +0000 (22:08 +0000)
committerKevin Enderby <enderby@apple.com>
Mon, 6 Jan 2014 22:08:08 +0000 (22:08 +0000)
commit284c8bc4b0c1642e0feced9d9b7416b08a4d1b5d
tree2341ab83744c8d209f6dd5a0956ea7bb8caebbab
parent177648336ab01faf4cee8a105a5f237642c23e98
For the 'C' disassembler API, add a new ReferenceType for the
SymbolLookUp() call back to return a demangled C++ name to
be used as a comment.

For example darwin's otool(1) program the uses the llvm
disassembler now can produce disassembly like:

callq   __ZNK4llvm6Target20createMCDisassemblerERKNS_15MCSubtargetInfoE ## llvm::Target::createMCDisassembler(llvm::MCSubtargetInfo const&) const

Also fix a bug in LLVMDisasmInstruction() that was not flushing
the raw_svector_ostream for the disassembled instruction string
before copying it to the output buffer that was causing truncation
of the output.

rdar://10173828

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198637 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm-c/Disassembler.h
lib/MC/MCDisassembler/Disassembler.cpp
lib/MC/MCExternalSymbolizer.cpp