aboutsummaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Function.h6
-rw-r--r--include/llvm/Module.h19
2 files changed, 6 insertions, 19 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h
index 34b6c0f252..885824d4f7 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 4d2edceb73..0bb23f9d40 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; }
//===--------------------------------------------------------------------===//