[PATCH] D51568: [modules] Add `-fno-absolute-module-directory` flag for relocatable modules

Manman Ren via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 29 07:27:34 PST 2018


manmanren added a comment.

I am not sure if this is the best approach, but the implementation looks okay to me. @bruno @rsmith What do you think?

Manman



================
Comment at: include/clang/Serialization/ASTReader.h:2241
     SkipString(Record, Idx);
+    Idx++;  // Relative
   }
----------------
Can you expand on this comment? Skip the relative bit?


================
Comment at: include/clang/Serialization/ASTWriter.h:642
   /// Convert a path from this build process into one that is appropriate
   /// for emission in the module file.
+  bool PreparePathForOutput(SmallVectorImpl<char> &Path,
----------------
Can you add comment here on how we set IsRelativeModuleDirectory?


================
Comment at: include/clang/Serialization/ASTWriter.h:650
   /// Emit the current record with the given path as a blob.
-  void EmitRecordWithPath(unsigned Abbrev, RecordDataRef Record,
+  void EmitRecordWithPath(unsigned Abbrev, RecordDataImpl &Record,
                           StringRef Path);
----------------
Can you update the comment to say that record is updated with the extra bit?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D51568/new/

https://reviews.llvm.org/D51568





More information about the cfe-commits mailing list