[PATCH] D17792: Initialize much of AssemblyWriter lazily.

Tim Shen via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 30 18:01:21 PDT 2016


timshen added inline comments.

================
Comment at: lib/IR/AsmWriter.cpp:416
@@ +415,3 @@
+
+  void EnsureTypesInitialized();
+
----------------
Do you think it's better to create a Lazy<T> template type, which has an Optional<T>, but automatically checks & value-initializes the underlying T on operator->()/operator*() ? It seems able to reduce the users' mind burden compared to using raw Optional.


http://reviews.llvm.org/D17792





More information about the llvm-commits mailing list