[llvm-commits] [dragonegg] r137045 - in /dragonegg/trunk: include/dragonegg/cache.h src/Types.cpp src/cache.c
Duncan Sands
baldrick at free.fr
Mon Aug 8 05:23:30 PDT 2011
Author: baldrick
Date: Mon Aug 8 07:23:29 2011
New Revision: 137045
URL: http://llvm.org/viewvc/llvm-project?rev=137045&view=rev
Log:
Remove llvm_has_cached since it has no advantages over checking
if llvm_get_cached returns a non-null value.
Modified:
dragonegg/trunk/include/dragonegg/cache.h
dragonegg/trunk/src/Types.cpp
dragonegg/trunk/src/cache.c
Modified: dragonegg/trunk/include/dragonegg/cache.h
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/include/dragonegg/cache.h?rev=137045&r1=137044&r2=137045&view=diff
==============================================================================
--- dragonegg/trunk/include/dragonegg/cache.h (original)
+++ dragonegg/trunk/include/dragonegg/cache.h Mon Aug 8 07:23:29 2011
@@ -28,10 +28,6 @@
union tree_node;
-/* llvm_has_cached - Returns whether a value has been associated with the
- tree. */
-extern int llvm_has_cached(union tree_node *tree);
-
/* llvm_get_cached - Returns the value associated with the tree, or NULL. */
extern const void *llvm_get_cached(union tree_node *tree);
Modified: dragonegg/trunk/src/Types.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Types.cpp?rev=137045&r1=137044&r2=137045&view=diff
==============================================================================
--- dragonegg/trunk/src/Types.cpp (original)
+++ dragonegg/trunk/src/Types.cpp Mon Aug 8 07:23:29 2011
@@ -338,8 +338,7 @@
}
static bool llvm_has_type(tree Tr) {
- assert(TYPE_P(Tr) && "Expected a gcc type!");
- return llvm_has_cached(Tr);
+ return llvm_get_type(Tr) != 0;
}
Modified: dragonegg/trunk/src/cache.c
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/cache.c?rev=137045&r1=137044&r2=137045&view=diff
==============================================================================
--- dragonegg/trunk/src/cache.c (original)
+++ dragonegg/trunk/src/cache.c Mon Aug 8 07:23:29 2011
@@ -55,18 +55,6 @@
#include "dragonegg/gt-cache-4.5.h"
#endif
-/* llvm_has_cached - Returns whether a value has been associated with the
- tree. */
-int llvm_has_cached(union tree_node *tree) {
- struct tree_map_base in;
-
- if (!llvm_cache)
- return false;
-
- in.from = tree;
- return htab_find(llvm_cache, &in) != NULL;
-}
-
/* llvm_get_cached - Returns the value associated with the tree, or NULL. */
const void *llvm_get_cached(union tree_node *tree) {
struct tree_llvm_map *h;
More information about the llvm-commits
mailing list