aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Module.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
-rw-r--r--llvm/lib/IR/Module.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp
index fc3f9d0..a0bda00 100644
--- a/llvm/lib/IR/Module.cpp
+++ b/llvm/lib/IR/Module.cpp
@@ -485,3 +485,11 @@ Optional<uint64_t> Module::getMaximumFunctionCount() {
return None;
return cast<ConstantInt>(Val->getValue())->getZExtValue();
}
+
+void Module::setProfileSummary(Metadata *M) {
+ addModuleFlag(ModFlagBehavior::Error, "ProfileSummary", M);
+}
+
+Metadata *Module::getProfileSummary() {
+ return getModuleFlag("ProfileSummary");
+}