summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/IR/ModuleSummaryIndex.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/IR/ModuleSummaryIndex.h')
-rw-r--r--llvm/include/llvm/IR/ModuleSummaryIndex.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/include/llvm/IR/ModuleSummaryIndex.h b/llvm/include/llvm/IR/ModuleSummaryIndex.h
index 48f2f7e0b30..c66727b3df2 100644
--- a/llvm/include/llvm/IR/ModuleSummaryIndex.h
+++ b/llvm/include/llvm/IR/ModuleSummaryIndex.h
@@ -168,6 +168,10 @@ public:
return static_cast<GlobalValue::LinkageTypes>(Flags.Linkage);
}
+ /// Return true if this summary is for a GlobalValue that needs promotion
+ /// to be referenced from another module.
+ bool needsRenaming() const { return GlobalValue::isLocalLinkage(linkage()); }
+
/// Return true if this global value is located in a specific section.
bool hasSection() const { return Flags.HasSection; }
OpenPOWER on IntegriCloud