From ca2c54e04e7e2a7e59058d56c2f2bd6c2758c171 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Sun, 24 Apr 2016 05:31:43 +0000 Subject: Add "hasSection" flag in the Summary Reviewers: tejohnson Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D19405 From: Mehdi Amini llvm-svn: 267329 --- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp') diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index d642dd4be23..fcce553cd1d 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -789,8 +789,14 @@ static unsigned getEncodedLinkage(const GlobalValue &GV) { // Decode the flags for GlobalValue in the summary static uint64_t getEncodedGVSummaryFlags(GlobalValueSummary::GVFlags Flags) { uint64_t RawFlags = 0; - // Emit Linkage enum. - RawFlags |= Flags.Linkage; // 4 bits + + RawFlags |= Flags.HasSection; // bool + + // Linkage don't need to be remapped at that time for the summary. Any future + // change to the getEncodedLinkage() function will need to be taken into + // account here as well. + RawFlags = (RawFlags << 4) | Flags.Linkage; // 4 bits + return RawFlags; } -- cgit v1.2.3