diff options
author | Chris Lattner <sabre@nondot.org> | 2001-07-14 06:07:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-07-14 06:07:58 +0000 |
commit | dc4c3f2f5fc6132885d590631b54de0be2c659be (patch) | |
tree | 9d7577e07b0c344e83f9e36f0e19c1d7a106830e /include/llvm/SymTabValue.h | |
parent | 49fec9638be606ab0d654bf5b03f56d179f0d33e (diff) | |
download | external_llvm-dc4c3f2f5fc6132885d590631b54de0be2c659be.zip external_llvm-dc4c3f2f5fc6132885d590631b54de0be2c659be.tar.gz external_llvm-dc4c3f2f5fc6132885d590631b54de0be2c659be.tar.bz2 |
Made the following changes:
* ValueHolder became a 3 argument template. This allows for BasicBlock to
use the value holder arg as a typesafe parent pointer.
* SymTabValue no longer inherits from Value
* Method does not inherit from only SymTabValue. Now it inherits from both
STV & Value.
* Module does not inherit from only SymTabValue. Now it inherits from both
STV & Value.
* Updated the SymTabValue.h file to reference SymTabValue instead of STDef
in several places
* Added isArraySelector & isStructSelector to GetElementPtr instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/SymTabValue.h')
-rw-r--r-- | include/llvm/SymTabValue.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/include/llvm/SymTabValue.h b/include/llvm/SymTabValue.h index 556d5c7..f86218d 100644 --- a/include/llvm/SymTabValue.h +++ b/include/llvm/SymTabValue.h @@ -1,31 +1,35 @@ -//===-- llvm/SymTabDef.h - Implement SymbolTable Defs ------------*- C++ -*--=// +//===-- llvm/SymTabValue.h - Implement SymbolTable Values --------*- C++ -*--=// // -// This subclass of Def implements a def that has a symbol table for keeping -// track of children. This is used by the DefHolder template class... +// This subclass of Value implements a def that has a symbol table for keeping +// track of children. This is used by the ValueHolder template class... // //===----------------------------------------------------------------------===// -#ifndef LLVM_SYMTABDEF_H -#define LLVM_SYMTABDEF_H +#ifndef LLVM_SYMTAB_VALUE_H +#define LLVM_SYMTAB_VALUE_H -#include "llvm/Value.h" // Get the definition of Value #include "llvm/ConstantPool.h" class SymbolTable; class ConstPoolVal; +class Value; -class SymTabValue : public Value { +class SymTabValue { public: typedef ConstantPool ConstantPoolType; private: SymbolTable *SymTab, *ParentSymTab; ConstantPool ConstPool; // The constant pool + Value *ValueParent; protected: void setParentSymTab(SymbolTable *ST); public: - SymTabValue(const Type *Ty, ValueTy dty, const string &name = ""); - ~SymTabValue(); // Implemented in Def.cpp + SymTabValue(Value *Parent); + ~SymTabValue(); // Implemented in Value.cpp + + inline Value *getSTVParent() { return ValueParent; } + inline const Value *getSTVParent() const { return ValueParent; } // hasSymbolTable() - Returns true if there is a symbol table allocated to // this object AND if there is at least one name in it! @@ -45,7 +49,7 @@ public: // the method does not already have a symtab, one is created. Use this if // you intend to put something into the symbol table for the method. // - SymbolTable *getSymbolTableSure(); // Implemented in Def.cpp + SymbolTable *getSymbolTableSure(); // Implemented in Value.cpp }; #endif |