[PATCH] D15996: Avoid undefined behavior in LinkAllPasses.h

Dimitry Andric via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 12 00:02:32 PST 2016


dim added a subscriber: grosser.

================
Comment at: include/llvm/LinkAllPasses.h:191
@@ -190,3 +196,3 @@
       llvm::RGPassManager RGM;
-      ((llvm::RegionPass*)nullptr)->runOnRegion((llvm::Region*)nullptr, RGM);
       llvm::AliasSetTracker X(*(llvm::AliasAnalysis*)nullptr);
----------------
@grosser, you originally added this part in rL117263 ("Reference RegionPass to stop it being eliminated"), do you have any suggestions? If the goal is to to unsure RegionPass.cpp is linked in, I think we can call `RegionPass::createPrinterPass()` instead.


http://reviews.llvm.org/D15996





More information about the llvm-commits mailing list