summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index e59fe060738..a976005e2e4 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -824,6 +824,9 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy,
// Attr->getStart is currently ignored.
Fn->addFnAttr("patchable-function-entry",
std::to_string(Attr->getCount()));
+ } else if (unsigned Count = CGM.getCodeGenOpts().PatchableFunctionEntryCount) {
+ Fn->addFnAttr("patchable-function-entry",
+ std::to_string(Count));
}
}
OpenPOWER on IntegriCloud