mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
Style update: don't duplicate the function name.
llvm-svn: 208227
This commit is contained in:
parent
0b0a2744cc
commit
643c61edc3
@ -33,26 +33,26 @@ protected:
|
|||||||
public:
|
public:
|
||||||
virtual ~GVMaterializer();
|
virtual ~GVMaterializer();
|
||||||
|
|
||||||
/// isMaterializable - True if GV can be materialized from whatever backing
|
/// True if GV can be materialized from whatever backing store this
|
||||||
/// store this GVMaterializer uses and has not been materialized yet.
|
/// GVMaterializer uses and has not been materialized yet.
|
||||||
virtual bool isMaterializable(const GlobalValue *GV) const = 0;
|
virtual bool isMaterializable(const GlobalValue *GV) const = 0;
|
||||||
|
|
||||||
/// isDematerializable - True if GV has been materialized and can be
|
/// True if GV has been materialized and can be dematerialized back to
|
||||||
/// dematerialized back to whatever backing store this GVMaterializer uses.
|
/// whatever backing store this GVMaterializer uses.
|
||||||
virtual bool isDematerializable(const GlobalValue *GV) const = 0;
|
virtual bool isDematerializable(const GlobalValue *GV) const = 0;
|
||||||
|
|
||||||
/// Materialize - make sure the given GlobalValue is fully read.
|
/// Make sure the given GlobalValue is fully read.
|
||||||
///
|
///
|
||||||
virtual error_code Materialize(GlobalValue *GV) = 0;
|
virtual error_code Materialize(GlobalValue *GV) = 0;
|
||||||
|
|
||||||
/// Dematerialize - If the given GlobalValue is read in, and if the
|
/// If the given GlobalValue is read in, and if the GVMaterializer supports
|
||||||
/// GVMaterializer supports it, release the memory for the GV, and set it up
|
/// it, release the memory for the GV, and set it up to be materialized
|
||||||
/// to be materialized lazily. If the Materializer doesn't support this
|
/// lazily. If the Materializer doesn't support this capability, this method
|
||||||
/// capability, this method is a noop.
|
/// is a noop.
|
||||||
///
|
///
|
||||||
virtual void Dematerialize(GlobalValue *) {}
|
virtual void Dematerialize(GlobalValue *) {}
|
||||||
|
|
||||||
/// MaterializeModule - make sure the entire Module has been completely read.
|
/// Make sure the entire Module has been completely read.
|
||||||
///
|
///
|
||||||
virtual error_code MaterializeModule(Module *M) = 0;
|
virtual error_code MaterializeModule(Module *M) = 0;
|
||||||
};
|
};
|
||||||
|
@ -110,7 +110,7 @@ public:
|
|||||||
const std::string &getSection() const;
|
const std::string &getSection() const;
|
||||||
void setSection(StringRef S);
|
void setSection(StringRef S);
|
||||||
|
|
||||||
/// getType - Global values are always pointers.
|
/// Global values are always pointers.
|
||||||
inline PointerType *getType() const {
|
inline PointerType *getType() const {
|
||||||
return cast<PointerType>(User::getType());
|
return cast<PointerType>(User::getType());
|
||||||
}
|
}
|
||||||
@ -153,24 +153,24 @@ public:
|
|||||||
return Linkage == CommonLinkage;
|
return Linkage == CommonLinkage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// isDiscardableIfUnused - Whether the definition of this global may be
|
/// Whether the definition of this global may be discarded if it is not used
|
||||||
/// discarded if it is not used in its compilation unit.
|
/// in its compilation unit.
|
||||||
static bool isDiscardableIfUnused(LinkageTypes Linkage) {
|
static bool isDiscardableIfUnused(LinkageTypes Linkage) {
|
||||||
return isLinkOnceLinkage(Linkage) || isLocalLinkage(Linkage);
|
return isLinkOnceLinkage(Linkage) || isLocalLinkage(Linkage);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// mayBeOverridden - Whether the definition of this global may be replaced
|
/// Whether the definition of this global may be replaced by something
|
||||||
/// by something non-equivalent at link time. For example, if a function has
|
/// non-equivalent at link time. For example, if a function has weak linkage
|
||||||
/// weak linkage then the code defining it may be replaced by different code.
|
/// then the code defining it may be replaced by different code.
|
||||||
static bool mayBeOverridden(LinkageTypes Linkage) {
|
static bool mayBeOverridden(LinkageTypes Linkage) {
|
||||||
return Linkage == WeakAnyLinkage || Linkage == LinkOnceAnyLinkage ||
|
return Linkage == WeakAnyLinkage || Linkage == LinkOnceAnyLinkage ||
|
||||||
Linkage == CommonLinkage || Linkage == ExternalWeakLinkage;
|
Linkage == CommonLinkage || Linkage == ExternalWeakLinkage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// isWeakForLinker - Whether the definition of this global may be replaced at
|
/// Whether the definition of this global may be replaced at link time. NB:
|
||||||
/// link time. NB: Using this method outside of the code generators is almost
|
/// Using this method outside of the code generators is almost always a
|
||||||
/// always a mistake: when working at the IR level use mayBeOverridden instead
|
/// mistake: when working at the IR level use mayBeOverridden instead as it
|
||||||
/// as it knows about ODR semantics.
|
/// knows about ODR semantics.
|
||||||
static bool isWeakForLinker(LinkageTypes Linkage) {
|
static bool isWeakForLinker(LinkageTypes Linkage) {
|
||||||
return Linkage == AvailableExternallyLinkage || Linkage == WeakAnyLinkage ||
|
return Linkage == AvailableExternallyLinkage || Linkage == WeakAnyLinkage ||
|
||||||
Linkage == WeakODRLinkage || Linkage == LinkOnceAnyLinkage ||
|
Linkage == WeakODRLinkage || Linkage == LinkOnceAnyLinkage ||
|
||||||
@ -206,13 +206,13 @@ public:
|
|||||||
|
|
||||||
bool isWeakForLinker() const { return isWeakForLinker(Linkage); }
|
bool isWeakForLinker() const { return isWeakForLinker(Linkage); }
|
||||||
|
|
||||||
/// copyAttributesFrom - copy all additional attributes (those not needed to
|
/// Copy all additional attributes (those not needed to create a GlobalValue)
|
||||||
/// create a GlobalValue) from the GlobalValue Src to this one.
|
/// from the GlobalValue Src to this one.
|
||||||
virtual void copyAttributesFrom(const GlobalValue *Src);
|
virtual void copyAttributesFrom(const GlobalValue *Src);
|
||||||
|
|
||||||
/// getRealLinkageName - If special LLVM prefix that is used to inform the asm
|
/// If special LLVM prefix that is used to inform the asm printer to not emit
|
||||||
/// printer to not emit usual symbol prefix before the symbol name is used
|
/// usual symbol prefix before the symbol name is used then return linkage
|
||||||
/// then return linkage name after skipping this special LLVM prefix.
|
/// name after skipping this special LLVM prefix.
|
||||||
static StringRef getRealLinkageName(StringRef Name) {
|
static StringRef getRealLinkageName(StringRef Name) {
|
||||||
if (!Name.empty() && Name[0] == '\1')
|
if (!Name.empty() && Name[0] == '\1')
|
||||||
return Name.substr(1);
|
return Name.substr(1);
|
||||||
@ -225,24 +225,24 @@ public:
|
|||||||
/// BitcodeReader to load the Module.
|
/// BitcodeReader to load the Module.
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
/// isMaterializable - If this function's Module is being lazily streamed in
|
/// If this function's Module is being lazily streamed in functions from disk
|
||||||
/// functions from disk or some other source, this method can be used to check
|
/// or some other source, this method can be used to check to see if the
|
||||||
/// to see if the function has been read in yet or not.
|
/// function has been read in yet or not.
|
||||||
bool isMaterializable() const;
|
bool isMaterializable() const;
|
||||||
|
|
||||||
/// isDematerializable - Returns true if this function was loaded from a
|
/// Returns true if this function was loaded from a GVMaterializer that's
|
||||||
/// GVMaterializer that's still attached to its Module and that knows how to
|
/// still attached to its Module and that knows how to dematerialize the
|
||||||
/// dematerialize the function.
|
/// function.
|
||||||
bool isDematerializable() const;
|
bool isDematerializable() const;
|
||||||
|
|
||||||
/// Materialize - make sure this GlobalValue is fully read. If the module is
|
/// Make sure this GlobalValue is fully read. If the module is corrupt, this
|
||||||
/// corrupt, this returns true and fills in the optional string with
|
/// returns true and fills in the optional string with information about the
|
||||||
/// information about the problem. If successful, this returns false.
|
/// problem. If successful, this returns false.
|
||||||
bool Materialize(std::string *ErrInfo = nullptr);
|
bool Materialize(std::string *ErrInfo = nullptr);
|
||||||
|
|
||||||
/// Dematerialize - If this GlobalValue is read in, and if the GVMaterializer
|
/// If this GlobalValue is read in, and if the GVMaterializer supports it,
|
||||||
/// supports it, release the memory for the function, and set it up to be
|
/// release the memory for the function, and set it up to be materialized
|
||||||
/// materialized lazily. If !isDematerializable(), this method is a noop.
|
/// lazily. If !isDematerializable(), this method is a noop.
|
||||||
void Dematerialize();
|
void Dematerialize();
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
@ -250,20 +250,18 @@ public:
|
|||||||
/// Override from Constant class.
|
/// Override from Constant class.
|
||||||
void destroyConstant() override;
|
void destroyConstant() override;
|
||||||
|
|
||||||
/// isDeclaration - Return true if the primary definition of this global
|
/// Return true if the primary definition of this global value is outside of
|
||||||
/// value is outside of the current translation unit.
|
/// the current translation unit.
|
||||||
bool isDeclaration() const;
|
bool isDeclaration() const;
|
||||||
|
|
||||||
/// removeFromParent - This method unlinks 'this' from the containing module,
|
/// This method unlinks 'this' from the containing module, but does not delete
|
||||||
/// but does not delete it.
|
/// it.
|
||||||
virtual void removeFromParent() = 0;
|
virtual void removeFromParent() = 0;
|
||||||
|
|
||||||
/// eraseFromParent - This method unlinks 'this' from the containing module
|
/// This method unlinks 'this' from the containing module and deletes it.
|
||||||
/// and deletes it.
|
|
||||||
virtual void eraseFromParent() = 0;
|
virtual void eraseFromParent() = 0;
|
||||||
|
|
||||||
/// getParent - Get the module that this global value is contained inside
|
/// Get the module that this global value is contained inside of...
|
||||||
/// of...
|
|
||||||
inline Module *getParent() { return Parent; }
|
inline Module *getParent() { return Parent; }
|
||||||
inline const Module *getParent() const { return Parent; }
|
inline const Module *getParent() const { return Parent; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user