[lld] r192944 - [Native] Fix fallback atoms when writing to Native file.

Shankar Easwaran shankare at codeaurora.org
Thu Oct 17 20:23:25 PDT 2013


Author: shankare
Date: Thu Oct 17 22:23:24 2013
New Revision: 192944

URL: http://llvm.org/viewvc/llvm-project?rev=192944&view=rev
Log:
[Native] Fix fallback atoms when writing to Native file.

There is no test as currently there is no call to the NativeWriter.

Future commits will add calls to the NativeWriter.

Modified:
    lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp

Modified: lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp?rev=192944&r1=192943&r2=192944&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp (original)
+++ lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp Thu Oct 17 22:23:24 2013
@@ -153,6 +153,9 @@ private:
     NativeUndefinedAtomIvarsV1 ivar;
     ivar.nameOffset = getNameOffset(atom);
     ivar.flags = (atom.canBeNull() & 0x03);
+    ivar.fallbackNameOffset = 0;
+    if (atom.fallback())
+      ivar.fallbackNameOffset = getNameOffset(*atom.fallback());
     _undefinedAtomIvars.push_back(ivar);
   }
 





More information about the llvm-commits mailing list