From ccf9f2b12e3a9bc2e3f7dcee298db6e04b912d3a Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Tue, 11 Aug 2009 07:46:16 +0000 Subject: [PATCH] Change llvm-c's ordering of contexts to make it consistent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78656 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm-c/BitReader.h | 8 ++++---- lib/Bitcode/Reader/BitReader.cpp | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/llvm-c/BitReader.h b/include/llvm-c/BitReader.h index 5dce27eb23b..a184f609d6b 100644 --- a/include/llvm-c/BitReader.h +++ b/include/llvm-c/BitReader.h @@ -32,8 +32,8 @@ extern "C" { int LLVMParseBitcode(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule, char **OutMessage); -int LLVMParseBitcodeInContext(LLVMMemoryBufferRef MemBuf, - LLVMContextRef ContextRef, +int LLVMParseBitcodeInContext(LLVMContextRef ContextRef, + LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule, char **OutMessage); /* Reads a module from the specified path, returning via the OutMP parameter @@ -43,8 +43,8 @@ int LLVMGetBitcodeModuleProvider(LLVMMemoryBufferRef MemBuf, LLVMModuleProviderRef *OutMP, char **OutMessage); -int LLVMGetBitcodeModuleProviderInContext(LLVMMemoryBufferRef MemBuf, - LLVMContextRef ContextRef, +int LLVMGetBitcodeModuleProviderInContext(LLVMContextRef ContextRef, + LLVMMemoryBufferRef MemBuf, LLVMModuleProviderRef *OutMP, char **OutMessage); diff --git a/lib/Bitcode/Reader/BitReader.cpp b/lib/Bitcode/Reader/BitReader.cpp index e5b8f7c7685..f513d41ce3b 100644 --- a/lib/Bitcode/Reader/BitReader.cpp +++ b/lib/Bitcode/Reader/BitReader.cpp @@ -34,12 +34,12 @@ int LLVMParseBitcode(LLVMMemoryBufferRef MemBuf, return 0; } -int LLVMParseBitcodeInContext(LLVMMemoryBufferRef MemBuf, - LLVMContextRef ContextRef, +int LLVMParseBitcodeInContext(LLVMContextRef ContextRef, + LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule, char **OutMessage) { std::string Message; - *OutModule = wrap(ParseBitcodeFile(unwrap(MemBuf), *unwrap(ContextRef), + *OutModule = wrap(ParseBitcodeFile(unwrap(MemBuf), *unwrap(ContextRef), &Message)); if (!*OutModule) { if (OutMessage) @@ -70,13 +70,13 @@ int LLVMGetBitcodeModuleProvider(LLVMMemoryBufferRef MemBuf, return 0; } -int LLVMGetBitcodeModuleProviderInContext(LLVMMemoryBufferRef MemBuf, - LLVMContextRef ContextRef, +int LLVMGetBitcodeModuleProviderInContext(LLVMContextRef ContextRef, + LLVMMemoryBufferRef MemBuf, LLVMModuleProviderRef *OutMP, char **OutMessage) { std::string Message; - *OutMP = wrap(getBitcodeModuleProvider(unwrap(MemBuf), *unwrap(ContextRef), + *OutMP = wrap(getBitcodeModuleProvider(unwrap(MemBuf), *unwrap(ContextRef), &Message)); if (!*OutMP) { if (OutMessage)