While in GlobalValue fix the function(s) that don't follow the
authorEric Christopher <echristo@gmail.com>
Fri, 15 May 2015 18:20:14 +0000 (18:20 +0000)
committerEric Christopher <echristo@gmail.com>
Fri, 15 May 2015 18:20:14 +0000 (18:20 +0000)
naming convention and update users.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237461 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/GVMaterializer.h
include/llvm/IR/GlobalValue.h
include/llvm/IR/Module.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/IR/Globals.cpp
lib/IR/Module.cpp
lib/Linker/LinkModules.cpp
unittests/Bitcode/BitReaderTest.cpp

index 779f2e0181842985eba3fee002d16e9a2eb56117..1d6c9157f0b8a13aceec7d6f9566b859409c0e99 100644 (file)
@@ -47,11 +47,11 @@ public:
   /// lazily. If the Materializer doesn't support this capability, this method
   /// is a noop.
   ///
-  virtual void Dematerialize(GlobalValue *) {}
+  virtual void dematerialize(GlobalValue *) {}
 
   /// Make sure the entire Module has been completely read.
   ///
-  virtual std::error_code MaterializeModule(Module *M) = 0;
+  virtual std::error_code materializeModule(Module *M) = 0;
 
   virtual std::error_code materializeMetadata() = 0;
   virtual void setStripDebugInfo() = 0;
index aeaaef4bd8b967626decb0f9986e98c427f4ae77..6d46a465ee718f4ede8c3ddb74cce81434417ff6 100644 (file)
@@ -317,7 +317,7 @@ public:
   /// If this GlobalValue is read in, and if the GVMaterializer supports it,
   /// release the memory for the function, and set it up to be materialized
   /// lazily. If !isDematerializable(), this method is a noop.
-  void Dematerialize();
+  void dematerialize();
 
 /// @}
 
index dbaf322263d43e00d3e2feadcad0ba2e27e40486..d8636dfb123e5b3e33ef90c520a6bed93681f37b 100644 (file)
@@ -492,7 +492,7 @@ public:
   /// If the GlobalValue is read in, and if the GVMaterializer supports it,
   /// release the memory for the function, and set it up to be materialized
   /// lazily. If !isDematerializable(), this method is a no-op.
-  void Dematerialize(GlobalValue *GV);
+  void dematerialize(GlobalValue *GV);
 
   /// Make sure all GlobalValues in this Module are fully read.
   std::error_code materializeAll();
index cb03218bff876eea3ad7d9761e1b74f61156b49a..145c734986218eff2f0b2e1faff10765daf9c630 100644 (file)
@@ -240,9 +240,9 @@ public:
 
   bool isDematerializable(const GlobalValue *GV) const override;
   std::error_code materialize(GlobalValue *GV) override;
-  std::error_code MaterializeModule(Module *M) override;
+  std::error_code materializeModule(Module *M) override;
   std::vector<StructType *> getIdentifiedStructTypes() const override;
-  void Dematerialize(GlobalValue *GV) override;
+  void dematerialize(GlobalValue *GV) override;
 
   /// @brief Main interface to parsing a bitcode buffer.
   /// @returns true if an error occurred.
@@ -4447,7 +4447,7 @@ bool BitcodeReader::isDematerializable(const GlobalValue *GV) const {
   return DeferredFunctionInfo.count(const_cast<Function*>(F));
 }
 
-void BitcodeReader::Dematerialize(GlobalValue *GV) {
+void BitcodeReader::dematerialize(GlobalValue *GV) {
   Function *F = dyn_cast<Function>(GV);
   // If this function isn't dematerializable, this is a noop.
   if (!F || !isDematerializable(F))
@@ -4460,7 +4460,7 @@ void BitcodeReader::Dematerialize(GlobalValue *GV) {
   F->setIsMaterializable(true);
 }
 
-std::error_code BitcodeReader::MaterializeModule(Module *M) {
+std::error_code BitcodeReader::materializeModule(Module *M) {
   assert(M == TheModule &&
          "Can only Materialize the Module this BitcodeReader is attached to.");
 
index 31f864d211590baf42aa6ff7ee6cadbb4fb3f758..1028e33eae6471f167be26bec221da97edbb5446 100644 (file)
@@ -38,8 +38,8 @@ bool GlobalValue::isDematerializable() const {
 std::error_code GlobalValue::materialize() {
   return getParent()->materialize(this);
 }
-void GlobalValue::Dematerialize() {
-  getParent()->Dematerialize(this);
+void GlobalValue::dematerialize() {
+  getParent()->dematerialize(this);
 }
 
 /// Override destroyConstant to make sure it doesn't get called on
index 3e8f91fee743a94ac001bf05ee4839598bb9b8e1..043f74e12da3e73a47772c2d500774ccd6f35d8f 100644 (file)
@@ -394,15 +394,15 @@ std::error_code Module::materialize(GlobalValue *GV) {
   return Materializer->materialize(GV);
 }
 
-void Module::Dematerialize(GlobalValue *GV) {
+void Module::dematerialize(GlobalValue *GV) {
   if (Materializer)
-    return Materializer->Dematerialize(GV);
+    return Materializer->dematerialize(GV);
 }
 
 std::error_code Module::materializeAll() {
   if (!Materializer)
     return std::error_code();
-  return Materializer->MaterializeModule(this);
+  return Materializer->materializeModule(this);
 }
 
 std::error_code Module::materializeAllPermanently() {
index 27b7ffd795af0f4480961d105488d686ca832088..1b7a33168f1d719b61dbc8e84afe1c7668a0190e 100644 (file)
@@ -1227,7 +1227,7 @@ bool ModuleLinker::linkFunctionBody(Function &Dst, Function &Src) {
   for (Argument &Arg : Src.args())
     ValueMap.erase(&Arg);
 
-  Src.Dematerialize();
+  Src.dematerialize();
   return false;
 }
 
index c746f5916724ea6eb9f16209fa2a97439d43f0d8..2e6dd0b499dec87ec41f6b45400d0d6b7008fa6b 100644 (file)
@@ -75,7 +75,7 @@ TEST(BitReaderTest, DematerializeFunctionPreservesLinkageType) {
               GlobalValue::InternalLinkage);
 
   // Check that the linkage type is preserved after dematerialization.
-  M->getFunction("func")->Dematerialize();
+  M->getFunction("func")->dematerialize();
   EXPECT_TRUE(M->getFunction("func")->empty());
   EXPECT_TRUE(M->getFunction("func")->getLinkage() ==
               GlobalValue::InternalLinkage);
@@ -160,7 +160,7 @@ TEST(BitReaderTest, MaterializeFunctionsForBlockAddr) { // PR11677
   EXPECT_FALSE(verifyModule(*M, &dbgs()));
 
   // Try (and fail) to dematerialize @func.
-  M->getFunction("func")->Dematerialize();
+  M->getFunction("func")->dematerialize();
   EXPECT_FALSE(M->getFunction("func")->empty());
 }
 
@@ -191,7 +191,7 @@ TEST(BitReaderTest, MaterializeFunctionsForBlockAddrInFunctionBefore) {
   EXPECT_FALSE(verifyModule(*M, &dbgs()));
 
   // Try (and fail) to dematerialize @func.
-  M->getFunction("func")->Dematerialize();
+  M->getFunction("func")->dematerialize();
   EXPECT_FALSE(M->getFunction("func")->empty());
   EXPECT_FALSE(verifyModule(*M, &dbgs()));
 }
@@ -223,7 +223,7 @@ TEST(BitReaderTest, MaterializeFunctionsForBlockAddrInFunctionAfter) {
   EXPECT_FALSE(verifyModule(*M, &dbgs()));
 
   // Try (and fail) to dematerialize @func.
-  M->getFunction("func")->Dematerialize();
+  M->getFunction("func")->dematerialize();
   EXPECT_FALSE(M->getFunction("func")->empty());
   EXPECT_FALSE(verifyModule(*M, &dbgs()));
 }