From f232935592b62fc2a1be0e0555c6078c5c3972cb Mon Sep 17 00:00:00 2001 From: Andi Drebes Date: Wed, 4 May 2022 15:52:45 +0200 Subject: [PATCH] fix: Make functions in LambdaSupport.h purely virtual to avoid linking errors in debug builds Some virtual functions in `LambdaSupport.h` are meant to be purely virtual, but lack a `= 0` in their signature. In debug builds, this causes the linker to look for a default implementation, resulting in a linker error. This patch marks the virtual functions as purely virtual, resolving the linker issues in debug builds. --- compiler/include/concretelang/Support/LambdaSupport.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/compiler/include/concretelang/Support/LambdaSupport.h b/compiler/include/concretelang/Support/LambdaSupport.h index 2ff7705dd..18b70fe24 100644 --- a/compiler/include/concretelang/Support/LambdaSupport.h +++ b/compiler/include/concretelang/Support/LambdaSupport.h @@ -249,7 +249,7 @@ public: /// Compile the mlir program and produces a compilation result if succeed. llvm::Expected> virtual compile( llvm::SourceMgr &program, - CompilationOptions options = CompilationOptions("main")); + CompilationOptions options = CompilationOptions("main")) = 0; llvm::Expected> compile(llvm::StringRef program, @@ -266,15 +266,16 @@ public: } /// Load the server lambda from the compilation result. - llvm::Expected virtual loadServerLambda(CompilationResult &result); + llvm::Expected virtual loadServerLambda( + CompilationResult &result) = 0; /// Load the client parameters from the compilation result. llvm::Expected virtual loadClientParameters( - CompilationResult &result); + CompilationResult &result) = 0; /// Call the lambda with the public arguments. llvm::Expected> virtual serverCall( - Lambda lambda, clientlib::PublicArguments &args); + Lambda lambda, clientlib::PublicArguments &args) = 0; /// Build the client KeySet from the client parameters. static llvm::Expected>