mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-23 12:08:25 +00:00
Change Method to Function
llvm-svn: 1952
This commit is contained in:
parent
1ff9888023
commit
e57136e0bf
@ -23,8 +23,6 @@
|
|||||||
#include "llvm/ValueHolder.h"
|
#include "llvm/ValueHolder.h"
|
||||||
#include "llvm/Value.h"
|
#include "llvm/Value.h"
|
||||||
|
|
||||||
class Instruction;
|
|
||||||
class Method;
|
|
||||||
class TerminatorInst;
|
class TerminatorInst;
|
||||||
class MachineCodeForBasicBlock;
|
class MachineCodeForBasicBlock;
|
||||||
template <class _Term, class _BB> class SuccIterator; // Successor Iterator
|
template <class _Term, class _BB> class SuccIterator; // Successor Iterator
|
||||||
@ -32,13 +30,13 @@ template <class _Ptr, class _USE_iterator> class PredIterator;
|
|||||||
|
|
||||||
class BasicBlock : public Value { // Basic blocks are data objects also
|
class BasicBlock : public Value { // Basic blocks are data objects also
|
||||||
public:
|
public:
|
||||||
typedef ValueHolder<Instruction, BasicBlock, Method> InstListType;
|
typedef ValueHolder<Instruction, BasicBlock, Function> InstListType;
|
||||||
private :
|
private :
|
||||||
InstListType InstList;
|
InstListType InstList;
|
||||||
MachineCodeForBasicBlock* machineInstrVec;
|
MachineCodeForBasicBlock* machineInstrVec;
|
||||||
|
|
||||||
friend class ValueHolder<BasicBlock,Method,Method>;
|
friend class ValueHolder<BasicBlock,Function,Function>;
|
||||||
void setParent(Method *parent);
|
void setParent(Function *parent);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Instruction iterators...
|
// Instruction iterators...
|
||||||
@ -48,15 +46,15 @@ public:
|
|||||||
typedef std::reverse_iterator<iterator> reverse_iterator;
|
typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||||
|
|
||||||
// Ctor, dtor
|
// Ctor, dtor
|
||||||
BasicBlock(const std::string &Name = "", Method *Parent = 0);
|
BasicBlock(const std::string &Name = "", Function *Parent = 0);
|
||||||
~BasicBlock();
|
~BasicBlock();
|
||||||
|
|
||||||
// Specialize setName to take care of symbol table majik
|
// Specialize setName to take care of symbol table majik
|
||||||
virtual void setName(const std::string &name, SymbolTable *ST = 0);
|
virtual void setName(const std::string &name, SymbolTable *ST = 0);
|
||||||
|
|
||||||
// getParent - Return the enclosing method, or null if none
|
// getParent - Return the enclosing method, or null if none
|
||||||
const Method *getParent() const { return InstList.getParent(); }
|
const Function *getParent() const { return InstList.getParent(); }
|
||||||
Method *getParent() { return InstList.getParent(); }
|
Function *getParent() { return InstList.getParent(); }
|
||||||
|
|
||||||
// getTerminator() - If this is a well formed basic block, then this returns
|
// getTerminator() - If this is a well formed basic block, then this returns
|
||||||
// a pointer to the terminator instruction. If it is not, then you get a null
|
// a pointer to the terminator instruction. If it is not, then you get a null
|
||||||
|
Loading…
Reference in New Issue
Block a user