llvm-6502/include/llvm-c
Kevin Enderby 6f45b1f0d6 Add to the disassembler C API output reference types for
Objective-C data structures.

This is allows tools such as darwin's otool(1) that uses the
LLVM disassembler take a pointer value being loaded by
an instruction and add a comment to what it is being referenced
to make following disassembly of Objective-C programs
more readable.

For example disassembling the Mac OS X TextEdit app one
will see comments like the following:

movq    0x20684(%rip), %rsi ## Objc selector ref: standardUserDefaults
movq    0x21985(%rip), %rdi ## Objc class ref: _OBJC_CLASS_$_NSUserDefaults
movq    0x1d156(%rip), %r14 ## Objc message: +[NSUserDefaults standardUserDefaults]
leaq    0x23615(%rip), %rdx ## Objc cfstring ref: @"SelectLinePanel"
callq   0x10001386c ## Objc message: -[[%rdi super] initWithWindowNibName:]

These diffs also include putting quotes around C strings
in literal pools and uses "symbol address" in the comment
when adding a symbol name to the comment to tell these
types of references apart:

leaq	0x4f(%rip), %rax ## literal pool for: "Hello world"
movq    0x1c3ea(%rip), %rax ## literal pool symbol address: ___stack_chk_guard

Of course the easy changes are in the LLVM disassembler and
the hard work is up to the implementer of the SymbolLookUp()
call back.

rdar://10602439


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193833 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-01 00:00:07 +00:00
..
Transforms Turn MipsOptimizeMathLibCalls into a target-independent scalar transform 2013-08-23 10:27:02 +00:00
Analysis.h Organize LLVM C API docs into doxygen modules; add docs 2012-03-21 03:54:29 +00:00
BitReader.h include/llvm-c: Whitespace. 2013-10-23 17:56:29 +00:00
BitWriter.h include/llvm-c: Whitespace. 2013-10-23 17:56:29 +00:00
Core.h llvm-c: Make LLVM{Get,Set}Alignment work on {Load,Store}Inst too 2013-10-29 09:02:02 +00:00
Disassembler.h Add to the disassembler C API output reference types for 2013-11-01 00:00:07 +00:00
ExecutionEngine.h include/llvm-c: Whitespace. 2013-10-23 17:56:29 +00:00
Initialization.h Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer. 2013-01-28 01:35:51 +00:00
Linker.h Supply a C interface to the "LinkModules" method. 2012-05-09 08:55:40 +00:00
LinkTimeOptimizer.h include/llvm-c: Whitespace. 2013-10-23 17:56:29 +00:00
lto.h Use LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN instead of the "dso list". 2013-10-31 20:51:58 +00:00
Object.h include/llvm-c: Whitespace. 2013-10-23 17:56:29 +00:00
Target.h llvm-c/Target.h: Tweak "inline" for msvc to use __inline instead. 2013-10-23 17:56:52 +00:00
TargetMachine.h llvm-c: Make LLVMGetFirstTarget a proper prototype 2013-09-19 19:43:55 +00:00