[llvm] [BOLT] Add support for safe-icf (PR #116275)

Maksim Panchenko via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 14:43:41 PST 2024


================
@@ -2050,6 +2052,13 @@ void RewriteInstance::adjustCommandLineOptions() {
     exit(1);
   }
 
+  if (!BC->HasRelocations &&
+      opts::ICF == IdenticalCodeFolding::ICFLevel::Safe) {
+    BC->errs() << "BOLT-ERROR: Binary built without relocations. Safe ICF is "
----------------
maksfb wrote:

```suggestion
    BC->errs() << "BOLT-ERROR: binary built without relocations. Safe ICF is "
```

https://github.com/llvm/llvm-project/pull/116275


More information about the llvm-commits mailing list