[PATCH] D60613: Make setInitializer() assert that the entire initializer is usable.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 24 16:06:59 PDT 2019


efriedma added a comment.

I don't think you actually need a recursion guard; you only recurse on ConstantAggregates, and they can't refer to themselves circularly.  But maybe it's a good idea anyway to avoid exponential compile-time in certain edge cases.



================
Comment at: llvm/unittests/IR/VerifierTest.cpp:237
+  EXPECT_TRUE(ErrorOS.str().substr(0, 36) ==
+              "Referencing global in another module");
+
----------------
This test *still* isn't testing what you want; verification fails due to the other global variable.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D60613





More information about the llvm-commits mailing list