+ // only instrument functions that contain atomics
+ if (Res && HasAtomic) {
+ /*
+ IRBuilder<> IRB(F.getEntryBlock().getFirstNonPHI());
+ Value *ReturnAddress = IRB.CreateCall(
+ Intrinsic::getDeclaration(F.getParent(), Intrinsic::returnaddress),
+ IRB.getInt32(0));
+
+ Value * FuncName = IRB.CreateGlobalStringPtr(F.getName());
+ */
+ //errs() << "function name: " << F.getName() << "\n";
+ //IRB.CreateCall(CDSFuncEntry, FuncName);
+
+/*
+ EscapeEnumerator EE(F, "tsan_cleanup", ClHandleCxxExceptions);
+ while (IRBuilder<> *AtExit = EE.Next()) {
+ AtExit->CreateCall(TsanFuncExit, {});
+ }
+*/
+ Res = true;