diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-01-01 10:31:22 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-01-01 10:31:22 +0000 |
commit | a16c51cee9225a354c999dd1076d5dba2aa79807 (patch) | |
tree | dba00119388b84f9f44e6ec5e9129f807fd79ca3 /include/llvm/Value.h | |
parent | 40a6fcdb85efd93fe0e36c9552cfb0b18b5eacd6 (diff) | |
download | FreeBSD-src-a16c51cee9225a354c999dd1076d5dba2aa79807.zip FreeBSD-src-a16c51cee9225a354c999dd1076d5dba2aa79807.tar.gz |
Update LLVM to 92395.
Diffstat (limited to 'include/llvm/Value.h')
-rw-r--r-- | include/llvm/Value.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/include/llvm/Value.h b/include/llvm/Value.h index 0960346..f0bd8be 100644 --- a/include/llvm/Value.h +++ b/include/llvm/Value.h @@ -17,7 +17,6 @@ #include "llvm/AbstractTypeUser.h" #include "llvm/Use.h" #include "llvm/ADT/StringRef.h" -#include "llvm/ADT/Twine.h" #include "llvm/Support/Casting.h" #include <string> @@ -42,7 +41,8 @@ class raw_ostream; class AssemblyAnnotationWriter; class ValueHandleBase; class LLVMContext; -class MetadataContextImpl; +class Twine; +class MDNode; //===----------------------------------------------------------------------===// // Value Class @@ -57,14 +57,13 @@ class MetadataContextImpl; /// /// Every value has a "use list" that keeps track of which other Values are /// using this Value. A Value can also have an arbitrary number of ValueHandle -/// objects that watch it and listen to RAUW and Destroy events see +/// objects that watch it and listen to RAUW and Destroy events. See /// llvm/Support/ValueHandle.h for details. /// /// @brief LLVM Value Representation class Value { const unsigned char SubclassID; // Subclass identifier (for isa/dyn_cast) unsigned char HasValueHandle : 1; // Has a ValueHandle pointing to this? - unsigned char HasMetadata : 1; // Has a metadata attached to this ? protected: /// SubclassOptionalData - This member is similar to SubclassData, however it /// is for holding information which may be used to aid optimization, but @@ -72,18 +71,17 @@ protected: /// interpretation. unsigned char SubclassOptionalData : 7; +private: /// SubclassData - This member is defined by this class, but is not used for /// anything. Subclasses can use it to hold whatever state they find useful. /// This field is initialized to zero by the ctor. unsigned short SubclassData; -private: + PATypeHolder VTy; Use *UseList; friend class ValueSymbolTable; // Allow ValueSymbolTable to directly mod Name. - friend class SymbolTable; // Allow SymbolTable to directly poke Name. friend class ValueHandleBase; - friend class MetadataContextImpl; friend class AbstractTypeUser; ValueName *Name; @@ -303,9 +301,10 @@ public: const BasicBlock *PredBB) const{ return const_cast<Value*>(this)->DoPHITranslation(CurBB, PredBB); } - - /// hasMetadata - Return true if metadata is attached with this value. - bool hasMetadata() const { return HasMetadata; } + +protected: + unsigned short getSubclassDataFromValue() const { return SubclassData; } + void setValueSubclassData(unsigned short D) { SubclassData = D; } }; inline raw_ostream &operator<<(raw_ostream &OS, const Value &V) { @@ -352,6 +351,9 @@ template <> inline bool isa_impl<GlobalValue, Value>(const Value &Val) { return isa<GlobalVariable>(Val) || isa<Function>(Val) || isa<GlobalAlias>(Val); } +template <> inline bool isa_impl<MDNode, Value>(const Value &Val) { + return Val.getValueID() == Value::MDNodeVal; +} // Value* is only 4-byte aligned. |