[llvm] r237461 - While in GlobalValue fix the function(s) that don't follow the
Eric Christopher
echristo at gmail.com
Fri May 15 11:20:14 PDT 2015
Author: echristo
Date: Fri May 15 13:20:14 2015
New Revision: 237461
URL: http://llvm.org/viewvc/llvm-project?rev=237461&view=rev
Log:
While in GlobalValue fix the function(s) that don't follow the
naming convention and update users.
Modified:
llvm/trunk/include/llvm/IR/GVMaterializer.h
llvm/trunk/include/llvm/IR/GlobalValue.h
llvm/trunk/include/llvm/IR/Module.h
llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/trunk/lib/IR/Globals.cpp
llvm/trunk/lib/IR/Module.cpp
llvm/trunk/lib/Linker/LinkModules.cpp
llvm/trunk/unittests/Bitcode/BitReaderTest.cpp
Modified: llvm/trunk/include/llvm/IR/GVMaterializer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/GVMaterializer.h?rev=237461&r1=237460&r2=237461&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/GVMaterializer.h (original)
+++ llvm/trunk/include/llvm/IR/GVMaterializer.h Fri May 15 13:20:14 2015
@@ -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;
Modified: llvm/trunk/include/llvm/IR/GlobalValue.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/GlobalValue.h?rev=237461&r1=237460&r2=237461&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/GlobalValue.h (original)
+++ llvm/trunk/include/llvm/IR/GlobalValue.h Fri May 15 13:20:14 2015
@@ -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();
/// @}
Modified: llvm/trunk/include/llvm/IR/Module.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Module.h?rev=237461&r1=237460&r2=237461&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Module.h (original)
+++ llvm/trunk/include/llvm/IR/Module.h Fri May 15 13:20:14 2015
@@ -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();
Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=237461&r1=237460&r2=237461&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Fri May 15 13:20:14 2015
@@ -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(c
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(Global
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.");
Modified: llvm/trunk/lib/IR/Globals.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Globals.cpp?rev=237461&r1=237460&r2=237461&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Globals.cpp (original)
+++ llvm/trunk/lib/IR/Globals.cpp Fri May 15 13:20:14 2015
@@ -38,8 +38,8 @@ bool GlobalValue::isDematerializable() c
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
Modified: llvm/trunk/lib/IR/Module.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Module.cpp?rev=237461&r1=237460&r2=237461&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Module.cpp (original)
+++ llvm/trunk/lib/IR/Module.cpp Fri May 15 13:20:14 2015
@@ -394,15 +394,15 @@ std::error_code Module::materialize(Glob
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() {
Modified: llvm/trunk/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=237461&r1=237460&r2=237461&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/LinkModules.cpp (original)
+++ llvm/trunk/lib/Linker/LinkModules.cpp Fri May 15 13:20:14 2015
@@ -1227,7 +1227,7 @@ bool ModuleLinker::linkFunctionBody(Func
for (Argument &Arg : Src.args())
ValueMap.erase(&Arg);
- Src.Dematerialize();
+ Src.dematerialize();
return false;
}
Modified: llvm/trunk/unittests/Bitcode/BitReaderTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Bitcode/BitReaderTest.cpp?rev=237461&r1=237460&r2=237461&view=diff
==============================================================================
--- llvm/trunk/unittests/Bitcode/BitReaderTest.cpp (original)
+++ llvm/trunk/unittests/Bitcode/BitReaderTest.cpp Fri May 15 13:20:14 2015
@@ -75,7 +75,7 @@ TEST(BitReaderTest, DematerializeFunctio
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, MaterializeFunctions
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, MaterializeFunctions
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, MaterializeFunctions
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()));
}
More information about the llvm-commits
mailing list