Skip to content

Commit 1cf4a9d

Browse files
committed
[llvm] clang-format changes to llvm-c library
1 parent 8d462f9 commit 1cf4a9d

23 files changed

+1222
-1012
lines changed

llvm/include/llvm-c/Analysis.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
#ifndef LLVM_C_ANALYSIS_H
2020
#define LLVM_C_ANALYSIS_H
2121

22-
#include "llvm-c/Visibility.h"
2322
#include "llvm-c/ExternC.h"
2423
#include "llvm-c/Types.h"
24+
#include "llvm-c/Visibility.h"
2525

2626
LLVM_C_EXTERN_C_BEGIN
2727

@@ -42,12 +42,14 @@ typedef enum {
4242
/* Verifies that a module is valid, taking the specified action if not.
4343
Optionally returns a human-readable description of any invalid constructs.
4444
OutMessage must be disposed with LLVMDisposeMessage. */
45-
LLVM_C_ABI LLVMBool LLVMVerifyModule(LLVMModuleRef M, LLVMVerifierFailureAction Action,
46-
char **OutMessage);
45+
LLVM_C_ABI LLVMBool LLVMVerifyModule(LLVMModuleRef M,
46+
LLVMVerifierFailureAction Action,
47+
char **OutMessage);
4748

4849
/* Verifies that a single function is valid, taking the specified action. Useful
4950
for debugging. */
50-
LLVM_C_ABI LLVMBool LLVMVerifyFunction(LLVMValueRef Fn, LLVMVerifierFailureAction Action);
51+
LLVM_C_ABI LLVMBool LLVMVerifyFunction(LLVMValueRef Fn,
52+
LLVMVerifierFailureAction Action);
5153

5254
/* Open up a ghostview window that displays the CFG of the current function.
5355
Useful for debugging. */

llvm/include/llvm-c/BitReader.h

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
#ifndef LLVM_C_BITREADER_H
2020
#define LLVM_C_BITREADER_H
2121

22-
#include "llvm-c/Visibility.h"
2322
#include "llvm-c/ExternC.h"
2423
#include "llvm-c/Types.h"
24+
#include "llvm-c/Visibility.h"
2525

2626
LLVM_C_EXTERN_C_BEGIN
2727

@@ -37,30 +37,33 @@ LLVM_C_EXTERN_C_BEGIN
3737
Optionally returns a human-readable error message via OutMessage.
3838
3939
This is deprecated. Use LLVMParseBitcode2. */
40-
LLVM_C_ABI LLVMBool LLVMParseBitcode(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule,
41-
char **OutMessage);
40+
LLVM_C_ABI LLVMBool LLVMParseBitcode(LLVMMemoryBufferRef MemBuf,
41+
LLVMModuleRef *OutModule,
42+
char **OutMessage);
4243

4344
/* Builds a module from the bitcode in the specified memory buffer, returning a
4445
reference to the module via the OutModule parameter. Returns 0 on success. */
4546
LLVM_C_ABI LLVMBool LLVMParseBitcode2(LLVMMemoryBufferRef MemBuf,
46-
LLVMModuleRef *OutModule);
47+
LLVMModuleRef *OutModule);
4748

4849
/* This is deprecated. Use LLVMParseBitcodeInContext2. */
4950
LLVM_C_ABI LLVMBool LLVMParseBitcodeInContext(LLVMContextRef ContextRef,
50-
LLVMMemoryBufferRef MemBuf,
51-
LLVMModuleRef *OutModule, char **OutMessage);
51+
LLVMMemoryBufferRef MemBuf,
52+
LLVMModuleRef *OutModule,
53+
char **OutMessage);
5254

5355
LLVM_C_ABI LLVMBool LLVMParseBitcodeInContext2(LLVMContextRef ContextRef,
54-
LLVMMemoryBufferRef MemBuf,
55-
LLVMModuleRef *OutModule);
56+
LLVMMemoryBufferRef MemBuf,
57+
LLVMModuleRef *OutModule);
5658

5759
/** Reads a module from the specified path, returning via the OutMP parameter
5860
a module provider which performs lazy deserialization. Returns 0 on success.
5961
Optionally returns a human-readable error message via OutMessage.
6062
This is deprecated. Use LLVMGetBitcodeModuleInContext2. */
6163
LLVM_C_ABI LLVMBool LLVMGetBitcodeModuleInContext(LLVMContextRef ContextRef,
62-
LLVMMemoryBufferRef MemBuf,
63-
LLVMModuleRef *OutM, char **OutMessage);
64+
LLVMMemoryBufferRef MemBuf,
65+
LLVMModuleRef *OutM,
66+
char **OutMessage);
6467

6568
/** Reads a module from the given memory buffer, returning via the OutMP
6669
* parameter a module provider which performs lazy deserialization.
@@ -70,14 +73,16 @@ LLVM_C_ABI LLVMBool LLVMGetBitcodeModuleInContext(LLVMContextRef ContextRef,
7073
* Takes ownership of \p MemBuf if (and only if) the module was read
7174
* successfully. */
7275
LLVM_C_ABI LLVMBool LLVMGetBitcodeModuleInContext2(LLVMContextRef ContextRef,
73-
LLVMMemoryBufferRef MemBuf,
74-
LLVMModuleRef *OutM);
76+
LLVMMemoryBufferRef MemBuf,
77+
LLVMModuleRef *OutM);
7578

7679
/* This is deprecated. Use LLVMGetBitcodeModule2. */
77-
LLVM_C_ABI LLVMBool LLVMGetBitcodeModule(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM,
78-
char **OutMessage);
80+
LLVM_C_ABI LLVMBool LLVMGetBitcodeModule(LLVMMemoryBufferRef MemBuf,
81+
LLVMModuleRef *OutM,
82+
char **OutMessage);
7983

80-
LLVM_C_ABI LLVMBool LLVMGetBitcodeModule2(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM);
84+
LLVM_C_ABI LLVMBool LLVMGetBitcodeModule2(LLVMMemoryBufferRef MemBuf,
85+
LLVMModuleRef *OutM);
8186

8287
/**
8388
* @}

llvm/include/llvm-c/BitWriter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
#ifndef LLVM_C_BITWRITER_H
2020
#define LLVM_C_BITWRITER_H
2121

22-
#include "llvm-c/Visibility.h"
2322
#include "llvm-c/ExternC.h"
2423
#include "llvm-c/Types.h"
24+
#include "llvm-c/Visibility.h"
2525

2626
LLVM_C_EXTERN_C_BEGIN
2727

@@ -39,7 +39,7 @@ LLVM_C_ABI int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path);
3939

4040
/** Writes a module to an open file descriptor. Returns 0 on success. */
4141
LLVM_C_ABI int LLVMWriteBitcodeToFD(LLVMModuleRef M, int FD, int ShouldClose,
42-
int Unbuffered);
42+
int Unbuffered);
4343

4444
/** Deprecated for LLVMWriteBitcodeToFD. Writes a module to an open file
4545
descriptor. Returns 0 on success. Closes the Handle. */

llvm/include/llvm-c/Comdat.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
#ifndef LLVM_C_COMDAT_H
1515
#define LLVM_C_COMDAT_H
1616

17-
#include "llvm-c/Visibility.h"
1817
#include "llvm-c/ExternC.h"
1918
#include "llvm-c/Types.h"
19+
#include "llvm-c/Visibility.h"
2020

2121
LLVM_C_EXTERN_C_BEGIN
2222

@@ -44,7 +44,8 @@ typedef enum {
4444
*
4545
* @see llvm::Module::getOrInsertComdat()
4646
*/
47-
LLVM_C_ABI LLVMComdatRef LLVMGetOrInsertComdat(LLVMModuleRef M, const char *Name);
47+
LLVM_C_ABI LLVMComdatRef LLVMGetOrInsertComdat(LLVMModuleRef M,
48+
const char *Name);
4849

4950
/**
5051
* Get the Comdat assigned to the given global object.
@@ -72,7 +73,8 @@ LLVM_C_ABI LLVMComdatSelectionKind LLVMGetComdatSelectionKind(LLVMComdatRef C);
7273
*
7374
* @see llvm::Comdat::setSelectionKind()
7475
*/
75-
LLVM_C_ABI void LLVMSetComdatSelectionKind(LLVMComdatRef C, LLVMComdatSelectionKind Kind);
76+
LLVM_C_ABI void LLVMSetComdatSelectionKind(LLVMComdatRef C,
77+
LLVMComdatSelectionKind Kind);
7678

7779
/**
7880
* @}

0 commit comments

Comments
 (0)