Skip to content

Commit

Permalink
Impl LLVM_STDCALL on llvm-c exports
Browse files Browse the repository at this point in the history
  • Loading branch information
wqweto committed Jul 6, 2018
1 parent 049fad1 commit cd1946d
Show file tree
Hide file tree
Showing 56 changed files with 1,427 additions and 1,416 deletions.
8 changes: 4 additions & 4 deletions lib/llvm-6.0.0.src/include/llvm-c/Analysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ typedef enum {
/* Verifies that a module is valid, taking the specified action if not.
Optionally returns a human-readable description of any invalid constructs.
OutMessage must be disposed with LLVMDisposeMessage. */
LLVMBool LLVMVerifyModule(LLVMModuleRef M, LLVMVerifierFailureAction Action,
LLVMBool LLVM_STDCALL LLVMVerifyModule(LLVMModuleRef M, LLVMVerifierFailureAction Action,
char **OutMessage);

/* Verifies that a single function is valid, taking the specified action. Useful
for debugging. */
LLVMBool LLVMVerifyFunction(LLVMValueRef Fn, LLVMVerifierFailureAction Action);
LLVMBool LLVM_STDCALL LLVMVerifyFunction(LLVMValueRef Fn, LLVMVerifierFailureAction Action);

/* Open up a ghostview window that displays the CFG of the current function.
Useful for debugging. */
void LLVMViewFunctionCFG(LLVMValueRef Fn);
void LLVMViewFunctionCFGOnly(LLVMValueRef Fn);
void LLVM_STDCALL LLVMViewFunctionCFG(LLVMValueRef Fn);
void LLVM_STDCALL LLVMViewFunctionCFGOnly(LLVMValueRef Fn);

/**
* @}
Expand Down
16 changes: 8 additions & 8 deletions lib/llvm-6.0.0.src/include/llvm-c/BitReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,42 +37,42 @@ extern "C" {
Optionally returns a human-readable error message via OutMessage.
This is deprecated. Use LLVMParseBitcode2. */
LLVMBool LLVMParseBitcode(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule,
LLVMBool LLVM_STDCALL LLVMParseBitcode(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule,
char **OutMessage);

/* Builds a module from the bitcode in the specified memory buffer, returning a
reference to the module via the OutModule parameter. Returns 0 on success. */
LLVMBool LLVMParseBitcode2(LLVMMemoryBufferRef MemBuf,
LLVMBool LLVM_STDCALL LLVMParseBitcode2(LLVMMemoryBufferRef MemBuf,
LLVMModuleRef *OutModule);

/* This is deprecated. Use LLVMParseBitcodeInContext2. */
LLVMBool LLVMParseBitcodeInContext(LLVMContextRef ContextRef,
LLVMBool LLVM_STDCALL LLVMParseBitcodeInContext(LLVMContextRef ContextRef,
LLVMMemoryBufferRef MemBuf,
LLVMModuleRef *OutModule, char **OutMessage);

LLVMBool LLVMParseBitcodeInContext2(LLVMContextRef ContextRef,
LLVMBool LLVM_STDCALL LLVMParseBitcodeInContext2(LLVMContextRef ContextRef,
LLVMMemoryBufferRef MemBuf,
LLVMModuleRef *OutModule);

/** Reads a module from the specified path, returning via the OutMP parameter
a module provider which performs lazy deserialization. Returns 0 on success.
Optionally returns a human-readable error message via OutMessage.
This is deprecated. Use LLVMGetBitcodeModuleInContext2. */
LLVMBool LLVMGetBitcodeModuleInContext(LLVMContextRef ContextRef,
LLVMBool LLVM_STDCALL LLVMGetBitcodeModuleInContext(LLVMContextRef ContextRef,
LLVMMemoryBufferRef MemBuf,
LLVMModuleRef *OutM, char **OutMessage);

/** Reads a module from the specified path, returning via the OutMP parameter a
* module provider which performs lazy deserialization. Returns 0 on success. */
LLVMBool LLVMGetBitcodeModuleInContext2(LLVMContextRef ContextRef,
LLVMBool LLVM_STDCALL LLVMGetBitcodeModuleInContext2(LLVMContextRef ContextRef,
LLVMMemoryBufferRef MemBuf,
LLVMModuleRef *OutM);

/* This is deprecated. Use LLVMGetBitcodeModule2. */
LLVMBool LLVMGetBitcodeModule(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM,
LLVMBool LLVM_STDCALL LLVMGetBitcodeModule(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM,
char **OutMessage);

LLVMBool LLVMGetBitcodeModule2(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM);
LLVMBool LLVM_STDCALL LLVMGetBitcodeModule2(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM);

/**
* @}
Expand Down
8 changes: 4 additions & 4 deletions lib/llvm-6.0.0.src/include/llvm-c/BitWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ extern "C" {
/*===-- Operations on modules ---------------------------------------------===*/

/** Writes a module to the specified path. Returns 0 on success. */
int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path);
int LLVM_STDCALL LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path);

/** Writes a module to an open file descriptor. Returns 0 on success. */
int LLVMWriteBitcodeToFD(LLVMModuleRef M, int FD, int ShouldClose,
int LLVM_STDCALL LLVMWriteBitcodeToFD(LLVMModuleRef M, int FD, int ShouldClose,
int Unbuffered);

/** Deprecated for LLVMWriteBitcodeToFD. Writes a module to an open file
descriptor. Returns 0 on success. Closes the Handle. */
int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int Handle);
int LLVM_STDCALL LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int Handle);

/** Writes a module to a new memory buffer and returns it. */
LLVMMemoryBufferRef LLVMWriteBitcodeToMemoryBuffer(LLVMModuleRef M);
LLVMMemoryBufferRef LLVM_STDCALL LLVMWriteBitcodeToMemoryBuffer(LLVMModuleRef M);

/**
* @}
Expand Down
Loading

0 comments on commit cd1946d

Please sign in to comment.