diff options
author | Amir Ayupov <aaupov@fb.com> | 2024-01-18 16:22:55 -0800 |
---|---|---|
committer | Amir Ayupov <aaupov@fb.com> | 2024-01-18 20:00:47 -0800 |
commit | 6735ce9d25acc091214cc90ff553f1d302f6b14e (patch) | |
tree | c49d5067a791766077246fe4c8b07d08ddb354ca /bolt/tools | |
parent | 9fec33aadc56c8c4ad3778a92dc0aaa3201a63ae (diff) | |
download | llvm-6735ce9d25acc091214cc90ff553f1d302f6b14e.zip llvm-6735ce9d25acc091214cc90ff553f1d302f6b14e.tar.gz llvm-6735ce9d25acc091214cc90ff553f1d302f6b14e.tar.bz2 |
[BOLT] Fix unconditional output of boltedcollection in merge-fdata (#78653)
Fix the bug where merge-fdata unconditionally outputs boltedcollection
line, regardless of whether input files have it set.
Test Plan:
Added bolt/test/X86/merge-fdata-nobat-mode.test which fails without this
fix.
Diffstat (limited to 'bolt/tools')
-rw-r--r-- | bolt/tools/merge-fdata/merge-fdata.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bolt/tools/merge-fdata/merge-fdata.cpp b/bolt/tools/merge-fdata/merge-fdata.cpp index e21aeba..104991d 100644 --- a/bolt/tools/merge-fdata/merge-fdata.cpp +++ b/bolt/tools/merge-fdata/merge-fdata.cpp @@ -329,7 +329,7 @@ void mergeLegacyProfiles(const SmallVectorImpl<std::string> &Filenames) { MergedProfile.insert_or_assign(Key, Count); } - if (BoltedCollection) + if (BoltedCollection.value_or(false)) output() << "boltedcollection\n"; for (const auto &[Key, Value] : MergedProfile) output() << Key << " " << Value << "\n"; |