summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/IR/GVMaterializer.h20
-rw-r--r--include/llvm/IR/GlobalValue.h68
2 files changed, 43 insertions, 45 deletions
diff --git a/include/llvm/IR/GVMaterializer.h b/include/llvm/IR/GVMaterializer.h
index 6717bc83b5..dbe52bc2a3 100644
--- a/include/llvm/IR/GVMaterializer.h
+++ b/include/llvm/IR/GVMaterializer.h
@@ -33,26 +33,26 @@ protected:
public:
virtual ~GVMaterializer();
- /// isMaterializable - True if GV can be materialized from whatever backing
- /// store this GVMaterializer uses and has not been materialized yet.
+ /// True if GV can be materialized from whatever backing store this
+ /// GVMaterializer uses and has not been materialized yet.
virtual bool isMaterializable(const GlobalValue *GV) const = 0;
- /// isDematerializable - True if GV has been materialized and can be
- /// dematerialized back to whatever backing store this GVMaterializer uses.
+ /// True if GV has been materialized and can be dematerialized back to
+ /// whatever backing store this GVMaterializer uses.
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;
- /// Dematerialize - If the given GlobalValue is read in, and if the
- /// GVMaterializer supports it, release the memory for the GV, and set it up
- /// to be materialized lazily. If the Materializer doesn't support this
- /// capability, this method is a noop.
+ /// If the given GlobalValue is read in, and if the GVMaterializer supports
+ /// it, release the memory for the GV, and set it up to be materialized
+ /// lazily. If the Materializer doesn't support this capability, this method
+ /// is a noop.
///
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;
};
diff --git a/include/llvm/IR/GlobalValue.h b/include/llvm/IR/GlobalValue.h
index 31cd31d741..8434300111 100644
--- a/include/llvm/IR/GlobalValue.h
+++ b/include/llvm/IR/GlobalValue.h
@@ -110,7 +110,7 @@ public:
const std::string &getSection() const;
void setSection(StringRef S);
- /// getType - Global values are always pointers.
+ /// Global values are always pointers.
inline PointerType *getType() const {
return cast<PointerType>(User::getType());
}
@@ -153,24 +153,24 @@ public:
return Linkage == CommonLinkage;
}
- /// isDiscardableIfUnused - Whether the definition of this global may be
- /// discarded if it is not used in its compilation unit.
+ /// Whether the definition of this global may be discarded if it is not used
+ /// in its compilation unit.
static bool isDiscardableIfUnused(LinkageTypes Linkage) {
return isLinkOnceLinkage(Linkage) || isLocalLinkage(Linkage);
}
- /// mayBeOverridden - Whether the definition of this global may be replaced
- /// by something non-equivalent at link time. For example, if a function has
- /// weak linkage then the code defining it may be replaced by different code.
+ /// Whether the definition of this global may be replaced by something
+ /// non-equivalent at link time. For example, if a function has weak linkage
+ /// then the code defining it may be replaced by different code.
static bool mayBeOverridden(LinkageTypes Linkage) {
return Linkage == WeakAnyLinkage || Linkage == LinkOnceAnyLinkage ||
Linkage == CommonLinkage || Linkage == ExternalWeakLinkage;
}
- /// isWeakForLinker - Whether the definition of this global may be replaced at
- /// link time. NB: Using this method outside of the code generators is almost
- /// always a mistake: when working at the IR level use mayBeOverridden instead
- /// as it knows about ODR semantics.
+ /// Whether the definition of this global may be replaced at link time. NB:
+ /// Using this method outside of the code generators is almost always a
+ /// mistake: when working at the IR level use mayBeOverridden instead as it
+ /// knows about ODR semantics.
static bool isWeakForLinker(LinkageTypes Linkage) {
return Linkage == AvailableExternallyLinkage || Linkage == WeakAnyLinkage ||
Linkage == WeakODRLinkage || Linkage == LinkOnceAnyLinkage ||
@@ -206,13 +206,13 @@ public:
bool isWeakForLinker() const { return isWeakForLinker(Linkage); }
- /// copyAttributesFrom - copy all additional attributes (those not needed to
- /// create a GlobalValue) from the GlobalValue Src to this one.
+ /// Copy all additional attributes (those not needed to create a GlobalValue)
+ /// from the GlobalValue Src to this one.
virtual void copyAttributesFrom(const GlobalValue *Src);
- /// getRealLinkageName - If special LLVM prefix that is used to inform the asm
- /// printer to not emit usual symbol prefix before the symbol name is used
- /// then return linkage name after skipping this special LLVM prefix.
+ /// If special LLVM prefix that is used to inform the asm printer to not emit
+ /// usual symbol prefix before the symbol name is used then return linkage
+ /// name after skipping this special LLVM prefix.
static StringRef getRealLinkageName(StringRef Name) {
if (!Name.empty() && Name[0] == '\1')
return Name.substr(1);
@@ -225,24 +225,24 @@ public:
/// BitcodeReader to load the Module.
/// @{
- /// isMaterializable - If this function's Module is being lazily streamed in
- /// functions from disk or some other source, this method can be used to check
- /// to see if the function has been read in yet or not.
+ /// If this function's Module is being lazily streamed in functions from disk
+ /// or some other source, this method can be used to check to see if the
+ /// function has been read in yet or not.
bool isMaterializable() const;
- /// isDematerializable - Returns true if this function was loaded from a
- /// GVMaterializer that's still attached to its Module and that knows how to
- /// dematerialize the function.
+ /// Returns true if this function was loaded from a GVMaterializer that's
+ /// still attached to its Module and that knows how to dematerialize the
+ /// function.
bool isDematerializable() const;
- /// Materialize - make sure this GlobalValue is fully read. If the module is
- /// corrupt, this returns true and fills in the optional string with
- /// information about the problem. If successful, this returns false.
+ /// Make sure this GlobalValue is fully read. If the module is corrupt, this
+ /// returns true and fills in the optional string with information about the
+ /// problem. If successful, this returns false.
bool Materialize(std::string *ErrInfo = nullptr);
- /// Dematerialize - 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.
+ /// 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();
/// @}
@@ -250,20 +250,18 @@ public:
/// Override from Constant class.
void destroyConstant() override;
- /// isDeclaration - Return true if the primary definition of this global
- /// value is outside of the current translation unit.
+ /// Return true if the primary definition of this global value is outside of
+ /// the current translation unit.
bool isDeclaration() const;
- /// removeFromParent - This method unlinks 'this' from the containing module,
- /// but does not delete it.
+ /// This method unlinks 'this' from the containing module, but does not delete
+ /// it.
virtual void removeFromParent() = 0;
- /// eraseFromParent - This method unlinks 'this' from the containing module
- /// and deletes it.
+ /// This method unlinks 'this' from the containing module and deletes it.
virtual void eraseFromParent() = 0;
- /// getParent - Get the module that this global value is contained inside
- /// of...
+ /// Get the module that this global value is contained inside of...
inline Module *getParent() { return Parent; }
inline const Module *getParent() const { return Parent; }