[PATCH] D31358: [asan] Put ctor/dtor in comdat.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 24 17:41:28 PDT 2017


pcc accepted this revision.
pcc added a comment.
This revision is now accepted and ready to land.

LGTM with nits



================
Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:1441
 
-  ConstantArray *CA = cast<ConstantArray>(GV->getInitializer());
+  ConstantArray *CA = cast<ConstantArray>(Init);
   for (Use &OP : CA->operands()) {
----------------
Could be a little simpler to `dyn_cast` and return if null.


================
Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:1784
 
   auto &DL = M.getDataLayout();
 
----------------
You could just set `*CtorComdat` to false here instead of the above.


Repository:
  rL LLVM

https://reviews.llvm.org/D31358





More information about the llvm-commits mailing list