[llvm-commits] CVS: llvm/include/llvm/Function.h Module.h
Chris Lattner
lattner at cs.uiuc.edu
Wed Nov 20 12:32:01 PST 2002
Changes in directory llvm/include/llvm:
Function.h updated: 1.39 -> 1.40
Module.h updated: 1.29 -> 1.30
---
Log message:
- Eliminated the deferred symbol table stuff in Module & Function, it really
wasn't an optimization and it was causing lots of bugs.
---
Diffs of the changes:
Index: llvm/include/llvm/Function.h
diff -u llvm/include/llvm/Function.h:1.39 llvm/include/llvm/Function.h:1.40
--- llvm/include/llvm/Function.h:1.39 Wed Nov 20 12:07:46 2002
+++ llvm/include/llvm/Function.h Wed Nov 20 12:31:31 2002
@@ -113,10 +113,8 @@
/// 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; }
//===--------------------------------------------------------------------===//
Index: llvm/include/llvm/Module.h
diff -u llvm/include/llvm/Module.h:1.29 llvm/include/llvm/Module.h:1.30
--- llvm/include/llvm/Module.h:1.29 Tue Nov 19 12:41:43 2002
+++ llvm/include/llvm/Module.h Wed Nov 20 12:31:31 2002
@@ -113,22 +113,11 @@
//===--------------------------------------------------------------------===//
// 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; }
//===--------------------------------------------------------------------===//
More information about the llvm-commits
mailing list