================
@@ -51,10 +51,14 @@ PreservedAnalyses FEntryInserterPass::run(MachineFunction 
&MF,
 }
 
 bool FEntryInserter::run(MachineFunction &MF) {
-  const std::string FEntryName = std::string(
-      MF.getFunction().getFnAttribute("fentry-call").getValueAsString());
-  if (FEntryName != "true")
+  const Function &F = MF.getFunction();
+  if (F.getFnAttribute("fentry-call").getValueAsString() != "true") {
+    if (F.hasFnAttribute("mnop-mcount"))
+      report_fatal_error("mnop-mcount only supported with fentry-call");
----------------
nikic wrote:

Though I still think that checking these in `llvm/lib/IR/Verifier.cpp` would be 
better.

https://github.com/llvm/llvm-project/pull/184641
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to