summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2012-12-07 23:53:27 +0000
committerJim Grosbach <grosbach@apple.com>2012-12-07 23:53:27 +0000
commit0ca9d5b7a5f40ca027a4d03ba9fcecf5bf223179 (patch)
treeed372b6ceda5fca4f5e496da6adeb92db6dbb7a0 /llvm/include/llvm-c
parent3087d026da6ad5d201497c0703ec876463180cfa (diff)
downloadbcm5719-llvm-0ca9d5b7a5f40ca027a4d03ba9fcecf5bf223179.tar.gz
bcm5719-llvm-0ca9d5b7a5f40ca027a4d03ba9fcecf5bf223179.zip
Add C API for specifying CPU to the disassembler.
It was a nasty oversight that we didn't include this when we added this API in the first place. Blech. rdar://12839439 llvm-svn: 169653
Diffstat (limited to 'llvm/include/llvm-c')
-rw-r--r--llvm/include/llvm-c/Disassembler.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/llvm/include/llvm-c/Disassembler.h b/llvm/include/llvm-c/Disassembler.h
index 3146332fa82..f0872c1436a 100644
--- a/llvm/include/llvm-c/Disassembler.h
+++ b/llvm/include/llvm-c/Disassembler.h
@@ -139,13 +139,26 @@ extern "C" {
* by passing a block of information in the DisInfo parameter and specifying the
* TagType and callback functions as described above. These can all be passed
* as NULL. If successful, this returns a disassembler context. If not, it
- * returns NULL.
+ * returns NULL. This function is equivalent to calling LLVMCreateDisasmCPU()
+ * with an empty CPU name.
*/
LLVMDisasmContextRef LLVMCreateDisasm(const char *TripleName, void *DisInfo,
int TagType, LLVMOpInfoCallback GetOpInfo,
LLVMSymbolLookupCallback SymbolLookUp);
/**
+ * Create a disassembler for the TripleName and a specific CPU. Symbolic
+ * disassembly is supported by passing a block of information in the DisInfo
+ * parameter and specifying the TagType and callback functions as described
+ * above. These can all be passed * as NULL. If successful, this returns a
+ * disassembler context. If not, it returns NULL.
+ */
+LLVMDisasmContextRef LLVMCreateDisasmCPU(const char *Triple, const char *CPU,
+ void *DisInfo, int TagType,
+ LLVMOpInfoCallback GetOpInfo,
+ LLVMSymbolLookupCallback SymbolLookUp);
+
+/**
* Set the disassembler's options. Returns 1 if it can set the Options and 0
* otherwise.
*/
OpenPOWER on IntegriCloud