From 6e6026b46569b01f8f6d4dcdb6c899c3a9c76b3e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 20 Nov 2002 18:36:02 +0000 Subject: - Eliminated the deferred symbol table stuff in Module & Function, it really wasn't an optimization and it was causing lots of bugs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4779 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Function.h | 6 ++---- include/llvm/Module.h | 19 ++++--------------- 2 files changed, 6 insertions(+), 19 deletions(-) (limited to 'include') diff --git a/include/llvm/Function.h b/include/llvm/Function.h index 34b6c0f..885824d 100644 --- a/include/llvm/Function.h +++ b/include/llvm/Function.h @@ -113,10 +113,8 @@ public: /// getSymbolTable() - Return the symbol table... /// - inline SymbolTable *getSymbolTable() { return SymTab; } - inline const SymbolTable *getSymbolTable() const { return SymTab; } - SymbolTable *getSymbolTableSure() { return SymTab; } - bool hasSymbolTable() const { return true; } + inline SymbolTable &getSymbolTable() { return *SymTab; } + inline const SymbolTable &getSymbolTable() const { return *SymTab; } //===--------------------------------------------------------------------===// diff --git a/include/llvm/Module.h b/include/llvm/Module.h index 4d2edce..0bb23f9 100644 --- a/include/llvm/Module.h +++ b/include/llvm/Module.h @@ -113,22 +113,11 @@ public: //===--------------------------------------------------------------------===// // Symbol table support functions... - /// hasSymbolTable() - Returns true if there is a symbol table allocated to - /// this object AND if there is at least one name in it! + /// getSymbolTable() - Get access to the symbol table for the module, where + /// global variables and functions are identified. /// - bool hasSymbolTable() const; - - /// getSymbolTable() - CAUTION: The current symbol table may be null if there - /// are no names (ie, the symbol table is empty) - /// - inline SymbolTable *getSymbolTable() { return SymTab; } - inline const SymbolTable *getSymbolTable() const { return SymTab; } - - /// getSymbolTableSure is guaranteed to not return a null pointer, because if - /// 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(); + inline SymbolTable &getSymbolTable() { return *SymTab; } + inline const SymbolTable &getSymbolTable() const { return *SymTab; } //===--------------------------------------------------------------------===// -- cgit v1.1