Files
concrete/compilers/concrete-compiler/compiler/lib/Support/Utils.cpp
youben11 1e435de9d6 fix: prefix compiled function name to avoid collision w other func
the new wrapper function will make a call to the main compiled function,
and we got some problem in the GOT/PLT due to function of the same name.
So now we prefiex with `concrete_` to avoid that.
2023-03-14 11:18:55 +01:00

23 lines
578 B
C++

// Part of the Concrete Compiler Project, under the BSD3 License with Zama
// Exceptions. See
// https://github.com/zama-ai/concrete-compiler-internal/blob/main/LICENSE.txt
// for license information.
#include <concretelang/Support/Utils.h>
namespace concretelang {
std::string prefixFuncName(llvm::StringRef funcName) {
return "concrete_" + funcName.str();
}
std::string makePackedFunctionName(llvm::StringRef name) {
return "_mlir_" + name.str();
}
uint64_t numArgOfRankedMemrefCallingConvention(uint64_t rank) {
return 3 + 2 * rank;
}
} // namespace concretelang