diff options
Diffstat (limited to 'bolt/lib/Rewrite/RewriteInstance.cpp')
-rw-r--r-- | bolt/lib/Rewrite/RewriteInstance.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/bolt/lib/Rewrite/RewriteInstance.cpp b/bolt/lib/Rewrite/RewriteInstance.cpp index bfd03e0..ddf9347 100644 --- a/bolt/lib/Rewrite/RewriteInstance.cpp +++ b/bolt/lib/Rewrite/RewriteInstance.cpp @@ -917,9 +917,6 @@ void RewriteInstance::discoverFileObjects() { bool IsData = false; uint64_t LastAddr = 0; for (const auto &SymInfo : SortedSymbols) { - if (LastAddr == SymInfo.Address) // don't repeat markers - continue; - MarkerSymType MarkerType = BC->getMarkerType(SymInfo.Symbol); // Treat ST_Function as code. @@ -929,8 +926,14 @@ void RewriteInstance::discoverFileObjects() { if (IsData) { Expected<StringRef> NameOrError = SymInfo.Symbol.getName(); consumeError(NameOrError.takeError()); - BC->errs() << "BOLT-WARNING: function symbol " << *NameOrError - << " lacks code marker\n"; + if (LastAddr == SymInfo.Address) { + BC->errs() << "BOLT-WARNING: ignoring data marker conflicting with " + "function symbol " + << *NameOrError << '\n'; + } else { + BC->errs() << "BOLT-WARNING: function symbol " << *NameOrError + << " lacks code marker\n"; + } } MarkerType = MarkerSymType::CODE; } |