Skip to content

Commit 22be34f

Browse files
[IR] clang-format ConstantFold.h (NFC)
I'm planning to modify this file.
1 parent 32693d9 commit 22be34f

File tree

1 file changed

+35
-36
lines changed

1 file changed

+35
-36
lines changed

llvm/include/llvm/IR/ConstantFold.h

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -26,42 +26,41 @@
2626
#include <optional>
2727

2828
namespace llvm {
29-
template <typename T> class ArrayRef;
30-
class Value;
31-
class Constant;
32-
class Type;
29+
template <typename T> class ArrayRef;
30+
class Value;
31+
class Constant;
32+
class Type;
3333

34-
// Constant fold various types of instruction...
35-
LLVM_ABI Constant *
36-
ConstantFoldCastInstruction(unsigned opcode, ///< The opcode of the cast
37-
Constant *V, ///< The source constant
38-
Type *DestTy ///< The destination type
39-
);
40-
LLVM_ABI Constant *ConstantFoldSelectInstruction(Constant *Cond, Constant *V1,
41-
Constant *V2);
42-
LLVM_ABI Constant *ConstantFoldExtractElementInstruction(Constant *Val,
43-
Constant *Idx);
44-
LLVM_ABI Constant *ConstantFoldInsertElementInstruction(Constant *Val,
45-
Constant *Elt,
46-
Constant *Idx);
47-
LLVM_ABI Constant *ConstantFoldShuffleVectorInstruction(Constant *V1,
48-
Constant *V2,
49-
ArrayRef<int> Mask);
50-
LLVM_ABI Constant *
51-
ConstantFoldExtractValueInstruction(Constant *Agg, ArrayRef<unsigned> Idxs);
52-
LLVM_ABI Constant *
53-
ConstantFoldInsertValueInstruction(Constant *Agg, Constant *Val,
54-
ArrayRef<unsigned> Idxs);
55-
LLVM_ABI Constant *ConstantFoldUnaryInstruction(unsigned Opcode, Constant *V);
56-
LLVM_ABI Constant *ConstantFoldBinaryInstruction(unsigned Opcode,
57-
Constant *V1, Constant *V2);
58-
LLVM_ABI Constant *
59-
ConstantFoldCompareInstruction(CmpInst::Predicate Predicate, Constant *C1,
60-
Constant *C2);
61-
LLVM_ABI Constant *
62-
ConstantFoldGetElementPtr(Type *Ty, Constant *C,
63-
std::optional<ConstantRange> InRange,
64-
ArrayRef<Value *> Idxs);
65-
} // End llvm namespace
34+
// Constant fold various types of instruction...
35+
LLVM_ABI Constant *
36+
ConstantFoldCastInstruction(unsigned opcode, ///< The opcode of the cast
37+
Constant *V, ///< The source constant
38+
Type *DestTy ///< The destination type
39+
);
40+
LLVM_ABI Constant *ConstantFoldSelectInstruction(Constant *Cond, Constant *V1,
41+
Constant *V2);
42+
LLVM_ABI Constant *ConstantFoldExtractElementInstruction(Constant *Val,
43+
Constant *Idx);
44+
LLVM_ABI Constant *ConstantFoldInsertElementInstruction(Constant *Val,
45+
Constant *Elt,
46+
Constant *Idx);
47+
LLVM_ABI Constant *ConstantFoldShuffleVectorInstruction(Constant *V1,
48+
Constant *V2,
49+
ArrayRef<int> Mask);
50+
LLVM_ABI Constant *ConstantFoldExtractValueInstruction(Constant *Agg,
51+
ArrayRef<unsigned> Idxs);
52+
LLVM_ABI Constant *ConstantFoldInsertValueInstruction(Constant *Agg,
53+
Constant *Val,
54+
ArrayRef<unsigned> Idxs);
55+
LLVM_ABI Constant *ConstantFoldUnaryInstruction(unsigned Opcode, Constant *V);
56+
LLVM_ABI Constant *ConstantFoldBinaryInstruction(unsigned Opcode, Constant *V1,
57+
Constant *V2);
58+
LLVM_ABI Constant *ConstantFoldCompareInstruction(CmpInst::Predicate Predicate,
59+
Constant *C1, Constant *C2);
60+
LLVM_ABI Constant *
61+
ConstantFoldGetElementPtr(Type *Ty, Constant *C,
62+
std::optional<ConstantRange> InRange,
63+
ArrayRef<Value *> Idxs);
64+
} // namespace llvm
6665

6766
#endif

0 commit comments

Comments
 (0)