mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
* Clean up indentation a bit
* Fix broken comments (copy and pasto) * Remove irrelevant comment * Add extra argument to function that causes it to get inserted into a module automatically. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3601 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
482701563a
commit
a42414bcf6
@ -1,11 +1,10 @@
|
|||||||
//===-- llvm/Function.h - Class to represent a single VM function -*- C++ -*-=//
|
//===-- llvm/Function.h - Class to represent a single function --*- C++ -*-===//
|
||||||
//
|
//
|
||||||
// This file contains the declaration of the Function class, which represents a
|
// This file contains the declaration of the Function class, which represents a
|
||||||
// single function/procedure in the VM.
|
// single function/procedure in LLVM.
|
||||||
//
|
//
|
||||||
// Note that BasicBlock's in the Function are Value's, because they are
|
// A function basically consists of a list of basic blocks, a list of arguments,
|
||||||
// referenced by instructions like calls and can go into virtual function tables
|
// and a symbol table.
|
||||||
// and stuff.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -55,7 +54,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
// Important things that make up a function!
|
// Important things that make up a function!
|
||||||
BasicBlockListType BasicBlocks; // The basic blocks
|
BasicBlockListType BasicBlocks; // The basic blocks
|
||||||
ArgumentListType ArgumentList; // The formal arguments
|
ArgumentListType ArgumentList; // The formal arguments
|
||||||
|
|
||||||
SymbolTable *SymTab, *ParentSymTab;
|
SymbolTable *SymTab, *ParentSymTab;
|
||||||
@ -68,7 +67,12 @@ private:
|
|||||||
void setPrev(Function *N) { Prev = N; }
|
void setPrev(Function *N) { Prev = N; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Function(const FunctionType *Ty, bool isInternal, const std::string &N = "");
|
/// Function ctor - If the (optional) Module argument is specified, the
|
||||||
|
/// function is automatically inserted into the end of the function list for
|
||||||
|
/// the module.
|
||||||
|
///
|
||||||
|
Function(const FunctionType *Ty, bool isInternal, const std::string &N = "",
|
||||||
|
Module *M = 0);
|
||||||
~Function();
|
~Function();
|
||||||
|
|
||||||
// Specialize setName to handle symbol table majik...
|
// Specialize setName to handle symbol table majik...
|
||||||
@ -83,8 +87,10 @@ public:
|
|||||||
///
|
///
|
||||||
bool isExternal() const { return BasicBlocks.empty(); }
|
bool isExternal() const { return BasicBlocks.empty(); }
|
||||||
|
|
||||||
// getNext/Prev - Return the next or previous instruction in the list. The
|
// getNext/Prev - Return the next or previous function in the list. These
|
||||||
// last node in the list is a terminator instruction.
|
// methods should never be used directly, and are only used to implement the
|
||||||
|
// function list as part of the module.
|
||||||
|
//
|
||||||
Function *getNext() { return Next; }
|
Function *getNext() { return Next; }
|
||||||
const Function *getNext() const { return Next; }
|
const Function *getNext() const { return Next; }
|
||||||
Function *getPrev() { return Prev; }
|
Function *getPrev() { return Prev; }
|
||||||
@ -156,12 +162,12 @@ public:
|
|||||||
reverse_aiterator arend () { return ArgumentList.rend(); }
|
reverse_aiterator arend () { return ArgumentList.rend(); }
|
||||||
const_reverse_aiterator arend () const { return ArgumentList.rend(); }
|
const_reverse_aiterator arend () const { return ArgumentList.rend(); }
|
||||||
|
|
||||||
unsigned asize() const { return ArgumentList.size(); }
|
unsigned asize() const { return ArgumentList.size(); }
|
||||||
bool aempty() const { return ArgumentList.empty(); }
|
bool aempty() const { return ArgumentList.empty(); }
|
||||||
const Argument &afront() const { return ArgumentList.front(); }
|
const Argument &afront() const { return ArgumentList.front(); }
|
||||||
Argument &afront() { return ArgumentList.front(); }
|
Argument &afront() { return ArgumentList.front(); }
|
||||||
const Argument &aback() const { return ArgumentList.back(); }
|
const Argument &aback() const { return ArgumentList.back(); }
|
||||||
Argument &aback() { return ArgumentList.back(); }
|
Argument &aback() { return ArgumentList.back(); }
|
||||||
|
|
||||||
virtual void print(std::ostream &OS) const;
|
virtual void print(std::ostream &OS) const;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user