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/Reader/BitcodeReader.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp') diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 0e29c0e77d7f..b8db3e8feea1 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -745,7 +745,9 @@ static GlobalValueSummary::GVFlags getDecodedGVSummaryFlags(uint64_t RawFlags, // like getDecodedLinkage() above. Any future change to the linkage enum and // to getDecodedLinkage() will need to be taken into account here as above. auto Linkage = GlobalValue::LinkageTypes(RawFlags & 0xF); // 4 bits - return GlobalValueSummary::GVFlags(Linkage); + RawFlags = RawFlags >> 4; + auto HasSection = RawFlags & 0x1; // bool + return GlobalValueSummary::GVFlags(Linkage, HasSection); } static GlobalValue::VisibilityTypes getDecodedVisibility(unsigned Val) { -- cgit v1.2.3