[PATCH] Do not destroy external linkage when deleting function body

Mark Seaborn mseaborn at chromium.org
Mon Sep 22 14:28:55 PDT 2014


LGTM

================
Comment at: unittests/Bitcode/BitReaderTest.cpp:61
@@ -60,1 +60,3 @@
 
+TEST(BitReaderTest, DematerializeFunctionAndPreserveLinkageType) {
+  SmallString<1024> Mem;
----------------
Nit: how about "DematerializeFunctionPreservesLinkageType" to capture the intent a little better?

================
Comment at: unittests/Bitcode/BitReaderTest.cpp:77
@@ +76,3 @@
+
+  // Check if the linkage type is preserved after dematerialization.
+  M->getFunction("func")->Dematerialize();
----------------
Nit: change to "Check that..." (otherwise the comment doesn't make it clear whether the test wants the linkage preserved or not)

http://reviews.llvm.org/D5415






More information about the llvm-commits mailing list