From 46010a87049bdf32ef23b08d25c186aba3aae442 Mon Sep 17 00:00:00 2001 From: van Hauser Date: Fri, 22 Jan 2021 13:50:16 +0100 Subject: prepare for cmplog rtn std::string support for llvm and g++ --- instrumentation/cmplog-routines-pass.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'instrumentation/cmplog-routines-pass.cc') diff --git a/instrumentation/cmplog-routines-pass.cc b/instrumentation/cmplog-routines-pass.cc index e92883ae..8adf42d5 100644 --- a/instrumentation/cmplog-routines-pass.cc +++ b/instrumentation/cmplog-routines-pass.cc @@ -131,6 +131,11 @@ bool CmpLogRoutines::hookRtns(Module &M) { FunctionType *FT = Callee->getFunctionType(); + // _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm + // => libc++ => llvm => __cmplog_rtn_llvm_stdstring_cstring(u8 *stdstring1, u8 *stdstring2) + // _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc + // => libstdc++ => gcc => __cmplog_rtn_gcc_stdstring_cstring + bool isPtrRtn = FT->getNumParams() >= 2 && !FT->getReturnType()->isVoidTy() && FT->getParamType(0) == FT->getParamType(1) && -- cgit 1.4.1