[llvm-commits] CVS: llvm/include/llvm/SymbolTable.h
LLVM
llvm at cs.uiuc.edu
Wed May 26 16:49:01 PDT 2004
Changes in directory llvm/include/llvm:
SymbolTable.h updated: 1.32 -> 1.33
---
Log message:
Tighten up checking on SymbolTable interface to make it illegal to pass a
Type* where a Value* is expected.
---
Diffs of the changes: (+4 -2)
Index: llvm/include/llvm/SymbolTable.h
diff -u llvm/include/llvm/SymbolTable.h:1.32 llvm/include/llvm/SymbolTable.h:1.33
--- llvm/include/llvm/SymbolTable.h:1.32 Wed May 26 12:42:51 2004
+++ llvm/include/llvm/SymbolTable.h Wed May 26 16:46:18 2004
@@ -165,8 +165,9 @@
/// @brief Insert a constant or type.
inline void insert(const std::string &Name, Value *Val) {
assert(Val && "Can't insert null type into symbol table!");
- assert((isa<Type>(Val) || isa<Constant>(Val)) &&
- "Can only insert types and constants into a symbol table!");
+ assert(!isa<Type>(Val) && "Cannot insert types with this interface!");
+ assert(isa<Constant>(Val) &&
+ "Can only insert constants into a symbol table!");
insertEntry(Name, Val->getType(), Val);
}
@@ -201,6 +202,7 @@
/// @brief Remove a constant or type from the symbol table.
inline Value* remove(const std::string &Name, Value *Val) {
assert(Val && "Can't remove null value from symbol table!");
+ assert(!isa<Type>(Val) && "Can't remove types with this interface!");
plane_iterator PI = pmap.find(Val->getType());
return removeEntry(PI, PI->second.find(Name));
}
More information about the llvm-commits
mailing list