Skip to content

Commit bb1f32d

Browse files
authored
[NFC][LLVM] Change initialize<PassName>PassOnce to return void (llvm#134500)
- The return value of these functions (called using `llvm::call_once`) is never used, so make these functions return void.
1 parent 20eb60d commit bb1f32d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/include/llvm/PassSupport.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace llvm {
3636
class Pass;
3737

3838
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis) \
39-
static void *initialize##passName##PassOnce(PassRegistry &Registry) {
39+
static void initialize##passName##PassOnce(PassRegistry &Registry) {
4040

4141
#define INITIALIZE_PASS_DEPENDENCY(depName) initialize##depName##Pass(Registry);
4242

@@ -45,7 +45,6 @@ class Pass;
4545
name, arg, &passName::ID, \
4646
PassInfo::NormalCtor_t(callDefaultCtor<passName>), cfg, analysis); \
4747
Registry.registerPass(*PI, true); \
48-
return PI; \
4948
} \
5049
static llvm::once_flag Initialize##passName##PassFlag; \
5150
void llvm::initialize##passName##Pass(PassRegistry &Registry) { \

0 commit comments

Comments
 (0)