Skip to content

Commit 8751dcb

Browse files
committed
[llvm] clang-format changes to SandboxIR library
1 parent e86e30a commit 8751dcb

File tree

13 files changed

+167
-136
lines changed

13 files changed

+167
-136
lines changed

llvm/include/llvm/SandboxIR/BasicBlock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
#ifndef LLVM_SANDBOXIR_BASICBLOCK_H
1010
#define LLVM_SANDBOXIR_BASICBLOCK_H
1111

12-
#include "llvm/Support/Compiler.h"
1312
#include "llvm/IR/BasicBlock.h"
1413
#include "llvm/SandboxIR/Value.h"
14+
#include "llvm/Support/Compiler.h"
1515

1616
namespace llvm::sandboxir {
1717

llvm/include/llvm/SandboxIR/Constant.h

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ class ConstantInt : public Constant {
9393
/// be interpreted as a 64-bit signed integer and sign-extended to fit
9494
/// the type.
9595
/// Get a ConstantInt for a specific value.
96-
LLVM_ABI static ConstantInt *get(IntegerType *Ty, uint64_t V, bool IsSigned = false);
96+
LLVM_ABI static ConstantInt *get(IntegerType *Ty, uint64_t V,
97+
bool IsSigned = false);
9798

9899
/// Return a ConstantInt with the specified value for the specified type. The
99100
/// value V will be canonicalized to a an unsigned APInt. Accessing it with
@@ -109,7 +110,8 @@ class ConstantInt : public Constant {
109110

110111
/// Return a ConstantInt constructed from the string strStart with the given
111112
/// radix.
112-
LLVM_ABI static ConstantInt *get(IntegerType *Ty, StringRef Str, uint8_t Radix);
113+
LLVM_ABI static ConstantInt *get(IntegerType *Ty, StringRef Str,
114+
uint8_t Radix);
113115

114116
/// If Ty is a vector type, return a Constant with a splat of the given
115117
/// value. Otherwise return a ConstantInt for the given value.
@@ -275,11 +277,11 @@ class ConstantFP final : public Constant {
275277
LLVM_ABI static ConstantFP *get(const APFloat &V, Context &Ctx);
276278

277279
LLVM_ABI static Constant *getNaN(Type *Ty, bool Negative = false,
278-
uint64_t Payload = 0);
280+
uint64_t Payload = 0);
279281
LLVM_ABI static Constant *getQNaN(Type *Ty, bool Negative = false,
280-
APInt *Payload = nullptr);
282+
APInt *Payload = nullptr);
281283
LLVM_ABI static Constant *getSNaN(Type *Ty, bool Negative = false,
282-
APInt *Payload = nullptr);
284+
APInt *Payload = nullptr);
283285
LLVM_ABI static Constant *getZero(Type *Ty, bool Negative = false);
284286

285287
LLVM_ABI static Constant *getNegativeZero(Type *Ty);
@@ -396,8 +398,8 @@ class ConstantStruct final : public ConstantAggregate {
396398
return get(getTypeForElements(Ctx, V, Packed), V);
397399
}
398400
/// This version of the method allows an empty list.
399-
LLVM_ABI static StructType *getTypeForElements(Context &Ctx, ArrayRef<Constant *> V,
400-
bool Packed = false);
401+
LLVM_ABI static StructType *
402+
getTypeForElements(Context &Ctx, ArrayRef<Constant *> V, bool Packed = false);
401403
/// Return an anonymous struct type to use for a constant with the specified
402404
/// set of elements. The list must not be empty.
403405
static StructType *getTypeForElements(ArrayRef<Constant *> V,
@@ -1061,14 +1063,14 @@ class GlobalWithNodeAPI : public ParentT {
10611063
};
10621064

10631065
// Explicit instantiations.
1064-
extern template class LLVM_TEMPLATE_ABI GlobalWithNodeAPI<GlobalIFunc, llvm::GlobalIFunc, GlobalObject,
1065-
llvm::GlobalObject>;
1066-
extern template class LLVM_TEMPLATE_ABI GlobalWithNodeAPI<Function, llvm::Function, GlobalObject,
1067-
llvm::GlobalObject>;
1068-
extern template class LLVM_TEMPLATE_ABI GlobalWithNodeAPI<GlobalVariable, llvm::GlobalVariable,
1069-
GlobalObject, llvm::GlobalObject>;
1070-
extern template class LLVM_TEMPLATE_ABI GlobalWithNodeAPI<GlobalAlias, llvm::GlobalAlias, GlobalValue,
1071-
llvm::GlobalValue>;
1066+
extern template class LLVM_TEMPLATE_ABI GlobalWithNodeAPI<
1067+
GlobalIFunc, llvm::GlobalIFunc, GlobalObject, llvm::GlobalObject>;
1068+
extern template class LLVM_TEMPLATE_ABI GlobalWithNodeAPI<
1069+
Function, llvm::Function, GlobalObject, llvm::GlobalObject>;
1070+
extern template class LLVM_TEMPLATE_ABI GlobalWithNodeAPI<
1071+
GlobalVariable, llvm::GlobalVariable, GlobalObject, llvm::GlobalObject>;
1072+
extern template class LLVM_TEMPLATE_ABI GlobalWithNodeAPI<
1073+
GlobalAlias, llvm::GlobalAlias, GlobalValue, llvm::GlobalValue>;
10721074

10731075
#if defined(_MSC_VER) && !defined(__clang__)
10741076
// These are needed for SandboxIRTest when building with LLVM_BUILD_LLVM_DYLIB
@@ -1382,7 +1384,7 @@ class ConstantPtrAuth final : public Constant {
13821384
public:
13831385
/// Return a pointer signed with the specified parameters.
13841386
LLVM_ABI static ConstantPtrAuth *get(Constant *Ptr, ConstantInt *Key,
1385-
ConstantInt *Disc, Constant *AddrDisc);
1387+
ConstantInt *Disc, Constant *AddrDisc);
13861388
/// The pointer that is signed in this ptrauth signed pointer.
13871389
LLVM_ABI Constant *getPointer() const;
13881390

llvm/include/llvm/SandboxIR/Context.h

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
#ifndef LLVM_SANDBOXIR_CONTEXT_H
1010
#define LLVM_SANDBOXIR_CONTEXT_H
1111

12-
#include "llvm/Support/Compiler.h"
1312
#include "llvm/ADT/DenseMap.h"
1413
#include "llvm/ADT/MapVector.h"
1514
#include "llvm/ADT/SmallVector.h"
1615
#include "llvm/IR/LLVMContext.h"
1716
#include "llvm/SandboxIR/Tracker.h"
1817
#include "llvm/SandboxIR/Type.h"
18+
#include "llvm/Support/Compiler.h"
1919

2020
#include <cstdint>
2121

@@ -123,7 +123,8 @@ class Context {
123123
friend class EraseFromParent; // For registerValue().
124124
/// This is the actual function that creates sandboxir values for \p V,
125125
/// and among others handles all instruction types.
126-
LLVM_ABI Value *getOrCreateValueInternal(llvm::Value *V, llvm::User *U = nullptr);
126+
LLVM_ABI Value *getOrCreateValueInternal(llvm::Value *V,
127+
llvm::User *U = nullptr);
127128
/// Get or create a sandboxir::Argument for an existing LLVM IR \p LLVMArg.
128129
LLVM_ABI Argument *getOrCreateArgument(llvm::Argument *LLVMArg);
129130
/// Get or create a sandboxir::Value for an existing LLVM IR \p LLVMV.
@@ -163,13 +164,17 @@ class Context {
163164
friend FenceInst; // For createFenceInst()
164165
LLVM_ABI SelectInst *createSelectInst(llvm::SelectInst *SI);
165166
friend SelectInst; // For createSelectInst()
166-
LLVM_ABI InsertElementInst *createInsertElementInst(llvm::InsertElementInst *IEI);
167+
LLVM_ABI InsertElementInst *
168+
createInsertElementInst(llvm::InsertElementInst *IEI);
167169
friend InsertElementInst; // For createInsertElementInst()
168-
LLVM_ABI ExtractElementInst *createExtractElementInst(llvm::ExtractElementInst *EEI);
170+
LLVM_ABI ExtractElementInst *
171+
createExtractElementInst(llvm::ExtractElementInst *EEI);
169172
friend ExtractElementInst; // For createExtractElementInst()
170-
LLVM_ABI ShuffleVectorInst *createShuffleVectorInst(llvm::ShuffleVectorInst *SVI);
173+
LLVM_ABI ShuffleVectorInst *
174+
createShuffleVectorInst(llvm::ShuffleVectorInst *SVI);
171175
friend ShuffleVectorInst; // For createShuffleVectorInst()
172-
LLVM_ABI ExtractValueInst *createExtractValueInst(llvm::ExtractValueInst *IVI);
176+
LLVM_ABI ExtractValueInst *
177+
createExtractValueInst(llvm::ExtractValueInst *IVI);
173178
friend ExtractValueInst; // For createExtractValueInst()
174179
LLVM_ABI InsertValueInst *createInsertValueInst(llvm::InsertValueInst *IVI);
175180
friend InsertValueInst; // For createInsertValueInst()
@@ -195,9 +200,11 @@ class Context {
195200
friend CleanupPadInst; // For createCleanupPadInst()
196201
LLVM_ABI CatchReturnInst *createCatchReturnInst(llvm::CatchReturnInst *I);
197202
friend CatchReturnInst; // For createCatchReturnInst()
198-
LLVM_ABI CleanupReturnInst *createCleanupReturnInst(llvm::CleanupReturnInst *I);
203+
LLVM_ABI CleanupReturnInst *
204+
createCleanupReturnInst(llvm::CleanupReturnInst *I);
199205
friend CleanupReturnInst; // For createCleanupReturnInst()
200-
LLVM_ABI GetElementPtrInst *createGetElementPtrInst(llvm::GetElementPtrInst *I);
206+
LLVM_ABI GetElementPtrInst *
207+
createGetElementPtrInst(llvm::GetElementPtrInst *I);
201208
friend GetElementPtrInst; // For createGetElementPtrInst()
202209
LLVM_ABI CatchSwitchInst *createCatchSwitchInst(llvm::CatchSwitchInst *I);
203210
friend CatchSwitchInst; // For createCatchSwitchInst()
@@ -211,7 +218,8 @@ class Context {
211218
friend BinaryOperator; // For createBinaryOperator()
212219
LLVM_ABI AtomicRMWInst *createAtomicRMWInst(llvm::AtomicRMWInst *I);
213220
friend AtomicRMWInst; // For createAtomicRMWInst()
214-
LLVM_ABI AtomicCmpXchgInst *createAtomicCmpXchgInst(llvm::AtomicCmpXchgInst *I);
221+
LLVM_ABI AtomicCmpXchgInst *
222+
createAtomicCmpXchgInst(llvm::AtomicCmpXchgInst *I);
215223
friend AtomicCmpXchgInst; // For createAtomicCmpXchgInst()
216224
LLVM_ABI AllocaInst *createAllocaInst(llvm::AllocaInst *I);
217225
friend AllocaInst; // For createAllocaInst()

llvm/include/llvm/SandboxIR/Function.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
#ifndef LLVM_SANDBOXIR_FUNCTION_H
1010
#define LLVM_SANDBOXIR_FUNCTION_H
1111

12-
#include "llvm/Support/Compiler.h"
1312
#include "llvm/IR/Function.h"
1413
#include "llvm/SandboxIR/Constant.h"
14+
#include "llvm/Support/Compiler.h"
1515

1616
namespace llvm::sandboxir {
1717

0 commit comments

Comments
 (0)