summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/ConstantRange.cpp1
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ConstantRange.cpp b/llvm/lib/Analysis/ConstantRange.cpp
index 3b74f403b32..022c34fe409 100644
--- a/llvm/lib/Analysis/ConstantRange.cpp
+++ b/llvm/lib/Analysis/ConstantRange.cpp
@@ -26,6 +26,7 @@
#include "llvm/Instruction.h"
#include "llvm/Instructions.h"
#include "llvm/Type.h"
+#include "llvm/DerivedTypes.h"
#include "llvm/Support/Streams.h"
#include <ostream>
using namespace llvm;
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 1df54c56ca4..1ee1cf2784f 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -1333,7 +1333,7 @@ static uint64_t GetConstantFactor(SCEVHandle S) {
if (SCEVTruncateExpr *T = dyn_cast<SCEVTruncateExpr>(S))
return GetConstantFactor(T->getOperand()) &
- T->getType()->getIntegerTypeMask();
+ cast<IntegerType>(T->getType())->getBitMask();
if (SCEVZeroExtendExpr *E = dyn_cast<SCEVZeroExtendExpr>(S))
return GetConstantFactor(E->getOperand());
OpenPOWER on IntegriCloud