[llvm] r360830 - [JITLink][MachO] Use getSymbol64TableEntry for 64-bit MachO files.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 17:21:07 PDT 2019


Author: lhames
Date: Wed May 15 17:21:07 2019
New Revision: 360830

URL: http://llvm.org/viewvc/llvm-project?rev=360830&view=rev
Log:
[JITLink][MachO] Use getSymbol64TableEntry for 64-bit MachO files.

Fixes a think-o. No test case: The nlist and nlist64 data structures happen to
line up for this field, so there's no way to construct a failing test case.

Modified:
    llvm/trunk/lib/ExecutionEngine/JITLink/MachOAtomGraphBuilder.cpp

Modified: llvm/trunk/lib/ExecutionEngine/JITLink/MachOAtomGraphBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JITLink/MachOAtomGraphBuilder.cpp?rev=360830&r1=360829&r2=360830&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/JITLink/MachOAtomGraphBuilder.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/JITLink/MachOAtomGraphBuilder.cpp Wed May 15 17:21:07 2019
@@ -256,7 +256,7 @@ Error MachOAtomGraphBuilder::addNonCusto
     {
       uint16_t NDesc = 0;
       if (Obj.is64Bit())
-        NDesc = Obj.getSymbolTableEntry(SymI->getRawDataRefImpl()).n_desc;
+        NDesc = Obj.getSymbol64TableEntry(SymI->getRawDataRefImpl()).n_desc;
       else
         NDesc = Obj.getSymbolTableEntry(SymI->getRawDataRefImpl()).n_desc;
 




More information about the llvm-commits mailing list