summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-04-24 05:31:43 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-04-24 05:31:43 +0000
commitca2c54e04e7e2a7e59058d56c2f2bd6c2758c171 (patch)
treec5b4d24d35d29f6111c90e5b2fdf2eda8fb55058 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent01b3a6184aae0b5ef1e2cccd4bb8da8d6a0df68a (diff)
downloadbcm5719-llvm-ca2c54e04e7e2a7e59058d56c2f2bd6c2758c171.tar.gz
bcm5719-llvm-ca2c54e04e7e2a7e59058d56c2f2bd6c2758c171.zip
Add "hasSection" flag in the Summary
Reviewers: tejohnson Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D19405 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 267329
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp10
1 files changed, 8 insertions, 2 deletions
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;
}
OpenPOWER on IntegriCloud