[PATCH] D59053: [LLD][COFF] Early dependency detection

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 06:24:35 PDT 2019


aganea added inline comments.


================
Comment at: COFF/InputFiles.cpp:688
+  if (IsPCH) {
+    DebugTypesObj = makeTpiSource(TpiSource::PCH, *this);
+    return;
----------------
aganea wrote:
> ruiu wrote:
> > If you do know the first argument for all function calls of `makeTpiSource`, you can define one function for each value of the first argument, instead of calling the same function and then dispatch according to the first argument.
> I did like you said - however now there are details leaking out of `DebugTypes.h`, like `TypeServer2Record` parameter to `makeUseTypeServerSource()`, which now requires having `#include "llvm/DebugInfo/CodeView/TypeRecord.h"` directly in `DebugTypes.h`, which can slow down compilation - if `DebugTypes.h` is included elsewhere. It's a tradeoff between terseness and compilation speed, please let me know which you prefer.
Forget what I said, it was late last night. Changed the parameters to pointers and forward declarations.


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D59053





More information about the llvm-commits mailing list