[llvm-dev] A proposed patch for llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h

Dale Martin via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 6 13:05:56 PDT 2020


Here's a 2 line patch I would like to propose:

  1.  Fix a typo s/anordered/an ordered/g
  2.  Instead of just printing to llvm::errs, report a fatal error and stop.

If there is a better list to discuss this on, please let me know.

Thanks,
  Dale

diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h
index aee5f6dc374..f34c93e8007 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h
@@ -114,8 +114,7 @@ public:
       // memory layout to be: CodeSection < ReadOnlySection < ReadWriteSection.
       const uint64_t ImageBase = getImageBase();
       if (Value < ImageBase || ((Value - ImageBase) > UINT32_MAX)) {
-        llvm::errs() << "IMAGE_REL_AMD64_ADDR32NB relocation requires an"
-                     << "ordered section layout.\n";
+        report_fatal_error("IMAGE_REL_AMD64_ADDR32NB relocation requires an ordered section layout");
         write32BitOffset(Target, 0, 0);
       } else {
         write32BitOffset(Target, RE.Addend, Value - ImageBase);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201006/a1bb6182/attachment.html>


More information about the llvm-dev mailing list