diff options
Diffstat (limited to 'llvm/tools/llvm-profgen/ProfiledBinary.cpp')
-rw-r--r-- | llvm/tools/llvm-profgen/ProfiledBinary.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/llvm-profgen/ProfiledBinary.cpp b/llvm/tools/llvm-profgen/ProfiledBinary.cpp index 265d088..20837f2 100644 --- a/llvm/tools/llvm-profgen/ProfiledBinary.cpp +++ b/llvm/tools/llvm-profgen/ProfiledBinary.cpp @@ -101,7 +101,7 @@ BinarySizeContextTracker::getFuncSizeForContext(const ContextTrieNode *Node) { PrevNode = CurrNode; CurrNode = CurrNode->getChildContext(CallSiteLoc, Node->getFuncName()); if (CurrNode && CurrNode->getFunctionSize()) - Size = CurrNode->getFunctionSize().value(); + Size = *CurrNode->getFunctionSize(); CallSiteLoc = Node->getCallSiteLoc(); Node = Node->getParentContext(); } @@ -115,12 +115,12 @@ BinarySizeContextTracker::getFuncSizeForContext(const ContextTrieNode *Node) { while (!Size && CurrNode && !CurrNode->getAllChildContext().empty()) { CurrNode = &CurrNode->getAllChildContext().begin()->second; if (CurrNode->getFunctionSize()) - Size = CurrNode->getFunctionSize().value(); + Size = *CurrNode->getFunctionSize(); } } assert(Size && "We should at least find one context size."); - return Size.value(); + return *Size; } void BinarySizeContextTracker::trackInlineesOptimizedAway( |