summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Constants.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-01-12 21:13:12 +0000
committerChris Lattner <sabre@nondot.org>2004-01-12 21:13:12 +0000
commit5a945e36167f962e8b67e8af9e81dfba9bd515bb (patch)
tree71c7b53583589d57c3cb5a7cce5e649683b31b9c /llvm/lib/VMCore/Constants.cpp
parent6ff6ceaf75e43e93667c120511ce18ae581f9cf9 (diff)
downloadbcm5719-llvm-5a945e36167f962e8b67e8af9e81dfba9bd515bb.tar.gz
bcm5719-llvm-5a945e36167f962e8b67e8af9e81dfba9bd515bb.zip
Rename ConstantHandling.* -> ConstantFolding.*
Move a bunch of (now) private stuff from ConstantFolding.h into ConstantFolding.cpp. This _finally_ gets us to a place where we have a sane constant folder. The rules are: 1. LLVM clients now use ConstantExpr::get* methods to fold constants. If they cannot be folded, a constantexpr is created, so these methods always return valid Constant*'s. 2. The implementation of ConstantExpr::get* uses the functions exposed by ConstantFolding.h to try to fold constants. If they cannot be folded, they should return a null pointer. 3. The implementation of ConstantFolding can do whatever it wants, and only has one client (Constants.cpp) This cuts down on the wierd dependencies, and eliminates the two interfaces. The old constanthandling interface was especially bad for clients to use because almost none of them took the failure condition into consideration, thus leading to obscure problems. llvm-svn: 10807
Diffstat (limited to 'llvm/lib/VMCore/Constants.cpp')
-rw-r--r--llvm/lib/VMCore/Constants.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp
index 35681c0b654..0a1c213fd20 100644
--- a/llvm/lib/VMCore/Constants.cpp
+++ b/llvm/lib/VMCore/Constants.cpp
@@ -12,7 +12,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/Constants.h"
-#include "ConstantHandling.h"
+#include "ConstantFolding.h"
#include "llvm/DerivedTypes.h"
#include "llvm/iMemory.h"
#include "llvm/SymbolTable.h"
OpenPOWER on IntegriCloud