aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/ModuleSummaryIndex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/ModuleSummaryIndex.cpp')
-rw-r--r--llvm/lib/IR/ModuleSummaryIndex.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/IR/ModuleSummaryIndex.cpp b/llvm/lib/IR/ModuleSummaryIndex.cpp
index 99e5044..7cba03e 100644
--- a/llvm/lib/IR/ModuleSummaryIndex.cpp
+++ b/llvm/lib/IR/ModuleSummaryIndex.cpp
@@ -107,11 +107,13 @@ uint64_t ModuleSummaryIndex::getFlags() const {
Flags |= 0x40;
if (withWholeProgramVisibility())
Flags |= 0x80;
+ if (withSupportsHotColdNew())
+ Flags |= 0x100;
return Flags;
}
void ModuleSummaryIndex::setFlags(uint64_t Flags) {
- assert(Flags <= 0xff && "Unexpected bits in flag");
+ assert(Flags <= 0x1ff && "Unexpected bits in flag");
// 1 bit: WithGlobalValueDeadStripping flag.
// Set on combined index only.
if (Flags & 0x1)
@@ -145,6 +147,10 @@ void ModuleSummaryIndex::setFlags(uint64_t Flags) {
// Set on combined index only.
if (Flags & 0x80)
setWithWholeProgramVisibility();
+ // 1 bit: WithSupportsHotColdNew flag.
+ // Set on combined index only.
+ if (Flags & 0x100)
+ setWithSupportsHotColdNew();
}
// Collect for the given module the list of function it defines