aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Scalar/DCE.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/DCE.cpp b/lib/Transforms/Scalar/DCE.cpp
index fa2c9c7221..f1582d3346 100644
--- a/lib/Transforms/Scalar/DCE.cpp
+++ b/lib/Transforms/Scalar/DCE.cpp
@@ -37,7 +37,12 @@ using namespace cfg;
struct ConstPoolDCE {
enum { EndOffs = 0 };
- static bool isDCEable(const Value *) { return true; }
+ static bool isDCEable(const ConstPoolVal *CPV) {
+ // TODO: The bytecode writer requires that all used types are in the
+ // constant pool for the current method. This is messy and is really
+ // irritating. FIXME
+ return CPV->getType() != Type::TypeTy; // Don't DCE Type plane constants!
+ }
};
struct BasicBlockDCE {