[PATCH] D78477: [profile] Don't crash when forking in several threads

serge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 24 02:40:54 PDT 2020


serge-sans-paille added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp:697
+    Builder.CreateCall(WriteoutF);
+    if (NextInst != Parent->end()) {
+      DebugLoc Loc = E->getDebugLoc();
----------------
I'm puzzled by this test. ``F`` is a CallInst, so not a terminator, so how can `NextInst` be past the Terminator?


================
Comment at: llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp:1263
+  Type *RetTy = ResetF->getReturnType();
+  if (RetTy == Type::getVoidTy(*Ctx))
+    Builder.CreateRetVoid();
----------------
[nit] could be  `if (RetTy->isVoidTy())`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78477/new/

https://reviews.llvm.org/D78477





More information about the cfe-commits mailing list