Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:40

0001 //===- ExpandVariadics.h - expand variadic functions ------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 #ifndef LLVM_TRANSFORMS_IPO_EXPANDVARIADICS_H
0009 #define LLVM_TRANSFORMS_IPO_EXPANDVARIADICS_H
0010 
0011 #include "llvm/IR/PassManager.h"
0012 
0013 namespace llvm {
0014 
0015 class Module;
0016 class ModulePass;
0017 class OptimizationLevel;
0018 
0019 enum class ExpandVariadicsMode {
0020   Unspecified, // Use the implementation defaults
0021   Disable,     // Disable the pass entirely
0022   Optimize,    // Optimise without changing ABI
0023   Lowering,    // Change variadic calling convention
0024 };
0025 
0026 class ExpandVariadicsPass : public PassInfoMixin<ExpandVariadicsPass> {
0027   const ExpandVariadicsMode Mode;
0028 
0029 public:
0030   // Operates under passed mode unless overridden on commandline
0031   ExpandVariadicsPass(ExpandVariadicsMode Mode);
0032 
0033   PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
0034 };
0035 
0036 ModulePass *createExpandVariadicsPass(ExpandVariadicsMode);
0037 
0038 } // end namespace llvm
0039 
0040 #endif // LLVM_TRANSFORMS_IPO_EXPANDVARIADICS_H