diff options
author | Chris Lattner <sabre@nondot.org> | 2004-05-09 04:29:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-05-09 04:29:49 +0000 |
commit | 43c81f19ee791760ac2079886e76dfdfed58dc72 (patch) | |
tree | ef5f8c06387abcb8b0661ca3c9af2963c50d28c2 | |
parent | a05e0ec4197908e5c9caa5ec5c47f3c143086247 (diff) |
Add support for inserting all prototypes up-front
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13431 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/CodeGen/IntrinsicLowering.h | 7 | ||||
-rw-r--r-- | include/llvm/IntrinsicLowering.h | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/IntrinsicLowering.h b/include/llvm/CodeGen/IntrinsicLowering.h index 19ccb61b47..43a4c991cf 100644 --- a/include/llvm/CodeGen/IntrinsicLowering.h +++ b/include/llvm/CodeGen/IntrinsicLowering.h @@ -37,10 +37,16 @@ namespace llvm { class CallInst; + class Module; struct IntrinsicLowering { virtual ~IntrinsicLowering() {} + /// AddPrototypes - This method, if called, causes all of the prototypes + /// that might be needed by an intrinsic lowering implementation to be + /// inserted into the module specified. + virtual void AddPrototypes(Module &M) = 0; + /// LowerIntrinsicCall - This method returns the LLVM function which should /// be used to implement the specified intrinsic function call. If an /// intrinsic function must be implemented by the code generator (such as @@ -59,6 +65,7 @@ namespace llvm { /// implementations should pass any unhandled intrinsics to this /// implementation to allow for future extensibility. struct DefaultIntrinsicLowering : public IntrinsicLowering { + virtual void AddPrototypes(Module &M); virtual void LowerIntrinsicCall(CallInst *CI); }; } diff --git a/include/llvm/IntrinsicLowering.h b/include/llvm/IntrinsicLowering.h index 19ccb61b47..43a4c991cf 100644 --- a/include/llvm/IntrinsicLowering.h +++ b/include/llvm/IntrinsicLowering.h @@ -37,10 +37,16 @@ namespace llvm { class CallInst; + class Module; struct IntrinsicLowering { virtual ~IntrinsicLowering() {} + /// AddPrototypes - This method, if called, causes all of the prototypes + /// that might be needed by an intrinsic lowering implementation to be + /// inserted into the module specified. + virtual void AddPrototypes(Module &M) = 0; + /// LowerIntrinsicCall - This method returns the LLVM function which should /// be used to implement the specified intrinsic function call. If an /// intrinsic function must be implemented by the code generator (such as @@ -59,6 +65,7 @@ namespace llvm { /// implementations should pass any unhandled intrinsics to this /// implementation to allow for future extensibility. struct DefaultIntrinsicLowering : public IntrinsicLowering { + virtual void AddPrototypes(Module &M); virtual void LowerIntrinsicCall(CallInst *CI); }; } |