summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/include/llvm-c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-06-12 18:01:31 +0000
committerdim <dim@FreeBSD.org>2011-06-12 18:01:31 +0000
commitd4c7939beafe09c033866ebd290e274af0cc826d (patch)
treea9b264321873e7d25e69b8671c9f705ebc6d30ee /contrib/llvm/include/llvm-c
parentb164882ef981a8ed5c085469231831e221fa1323 (diff)
parentece02cd5829cea836e9365b0845a8ef042d17b0a (diff)
downloadFreeBSD-src-d4c7939beafe09c033866ebd290e274af0cc826d.zip
FreeBSD-src-d4c7939beafe09c033866ebd290e274af0cc826d.tar.gz
Upgrade our copy of llvm/clang to r132879, from upstream's trunk.
Diffstat (limited to 'contrib/llvm/include/llvm-c')
-rw-r--r--contrib/llvm/include/llvm-c/Core.h3
-rw-r--r--contrib/llvm/include/llvm-c/Disassembler.h71
2 files changed, 34 insertions, 40 deletions
diff --git a/contrib/llvm/include/llvm-c/Core.h b/contrib/llvm/include/llvm-c/Core.h
index 39c3cb4..2eccc11 100644
--- a/contrib/llvm/include/llvm-c/Core.h
+++ b/contrib/llvm/include/llvm-c/Core.h
@@ -282,6 +282,8 @@ typedef enum {
LLVMRealPredicateTrue /**< Always true (always folded) */
} LLVMRealPredicate;
+void LLVMInitializeCore(LLVMPassRegistryRef R);
+
/*===-- Error handling ----------------------------------------------------===*/
@@ -1164,6 +1166,7 @@ namespace llvm {
for (LLVMValueRef *I = Vals, *E = Vals + Length; I != E; ++I)
cast<T>(*I);
#endif
+ (void)Length;
return reinterpret_cast<T**>(Vals);
}
diff --git a/contrib/llvm/include/llvm-c/Disassembler.h b/contrib/llvm/include/llvm-c/Disassembler.h
index 9f10973..3a3eb23 100644
--- a/contrib/llvm/include/llvm-c/Disassembler.h
+++ b/contrib/llvm/include/llvm-c/Disassembler.h
@@ -7,16 +7,16 @@
|* *|
|*===----------------------------------------------------------------------===*|
|* *|
-|* This header provides public interface to a disassembler library. *|
+|* This header provides a public interface to a disassembler library. *|
|* LLVM provides an implementation of this interface. *|
|* *|
\*===----------------------------------------------------------------------===*/
#ifndef LLVM_C_DISASSEMBLER_H
-#define LLVM_C_DISASSEMBLER_H 1
+#define LLVM_C_DISASSEMBLER_H
-#include <stddef.h>
#include "llvm/Support/DataTypes.h"
+#include <stddef.h>
/**
* An opaque reference to a disassembler context.
@@ -38,14 +38,11 @@ typedef void *LLVMDisasmContextRef;
* will be the instruction width. The information is returned in TagBuf and is
* Triple specific with its specific information defined by the value of
* TagType for that Triple. If symbolic information is returned the function
- * returns 1 else it returns 0.
+ * returns 1, otherwise it returns 0.
*/
-typedef int (*LLVMOpInfoCallback)(void *DisInfo,
- uint64_t PC,
- uint64_t Offset,
- uint64_t Size,
- int TagType,
- void *TagBuf);
+typedef int (*LLVMOpInfoCallback)(void *DisInfo, uint64_t PC,
+ uint64_t Offset, uint64_t Size,
+ int TagType, void *TagBuf);
/**
* The initial support in LLVM MC for the most general form of a relocatable
@@ -68,10 +65,11 @@ typedef int (*LLVMOpInfoCallback)(void *DisInfo,
* operands like "_foo@GOT", ":lower16:_foo", etc.
*/
struct LLVMOpInfoSymbol1 {
- uint64_t Present; /* 1 if this symbol is present */
- char *Name; /* symbol name if not NULL */
- uint64_t Value; /* symbol value if name is NULL */
+ uint64_t Present; /* 1 if this symbol is present */
+ char *Name; /* symbol name if not NULL */
+ uint64_t Value; /* symbol value if name is NULL */
};
+
struct LLVMOpInfo1 {
struct LLVMOpInfoSymbol1 AddSymbol;
struct LLVMOpInfoSymbol1 SubtractSymbol;
@@ -92,11 +90,11 @@ struct LLVMOpInfo1 {
/**
* The type for the symbol lookup function. This may be called by the
- * disassembler for such things like adding a comment for a PC plus a constant
+ * disassembler for things like adding a comment for a PC plus a constant
* offset load instruction to use a symbol name instead of a load address value.
* It is passed the block information is saved when the disassembler context is
* created and a value of a symbol to look up. If no symbol is found NULL is
- * to be returned.
+ * returned.
*/
typedef const char *(*LLVMSymbolLookupCallback)(void *DisInfo,
uint64_t SymbolValue);
@@ -107,40 +105,33 @@ extern "C" {
/**
* Create a disassembler for the TripleName. Symbolic disassembly is supported
- * by passing a block of information in the DisInfo parameter and specifing the
- * TagType and call back functions as described above. These can all be passed
- * as NULL. If successful this returns a disassembler context if not it
+ * 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.
*/
-extern LLVMDisasmContextRef
-LLVMCreateDisasm(const char *TripleName,
- void *DisInfo,
- int TagType,
- LLVMOpInfoCallback GetOpInfo,
- LLVMSymbolLookupCallback SymbolLookUp);
+LLVMDisasmContextRef LLVMCreateDisasm(const char *TripleName, void *DisInfo,
+ int TagType, LLVMOpInfoCallback GetOpInfo,
+ LLVMSymbolLookupCallback SymbolLookUp);
/**
* Dispose of a disassembler context.
*/
-extern void
-LLVMDisasmDispose(LLVMDisasmContextRef DC);
+void LLVMDisasmDispose(LLVMDisasmContextRef DC);
/**
- * Disassmble a single instruction using the disassembler context specified in
- * the parameter DC. The bytes of the instruction are specified in the parameter
- * Bytes, and contains at least BytesSize number of bytes. The instruction is
- * at the address specified by the PC parameter. If a valid instruction can be
- * disassembled its string is returned indirectly in OutString which whos size
- * is specified in the parameter OutStringSize. This function returns the
- * number of bytes in the instruction or zero if there was no valid instruction.
+ * Disassemble a single instruction using the disassembler context specified in
+ * the parameter DC. The bytes of the instruction are specified in the
+ * parameter Bytes, and contains at least BytesSize number of bytes. The
+ * instruction is at the address specified by the PC parameter. If a valid
+ * instruction can be disassembled, its string is returned indirectly in
+ * OutString whose size is specified in the parameter OutStringSize. This
+ * function returns the number of bytes in the instruction or zero if there was
+ * no valid instruction.
*/
-extern size_t
-LLVMDisasmInstruction(LLVMDisasmContextRef DC,
- uint8_t *Bytes,
- uint64_t BytesSize,
- uint64_t PC,
- char *OutString,
- size_t OutStringSize);
+size_t LLVMDisasmInstruction(LLVMDisasmContextRef DC, uint8_t *Bytes,
+ uint64_t BytesSize, uint64_t PC,
+ char *OutString, size_t OutStringSize);
#ifdef __cplusplus
}
OpenPOWER on IntegriCloud