mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-02 02:14:23 +00:00
Make GetElementPtr ConstantExprs default to having no pointer overflow.
llvm-svn: 76280
This commit is contained in:
parent
fe529a2c29
commit
8c7d396617
@ -18,6 +18,7 @@
|
||||
#include "llvm/Instructions.h"
|
||||
#include "llvm/MDNode.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Operator.h"
|
||||
#include "llvm/ADT/FoldingSet.h"
|
||||
#include "llvm/ADT/StringExtras.h"
|
||||
#include "llvm/ADT/StringMap.h"
|
||||
@ -474,8 +475,11 @@ public:
|
||||
static GetElementPtrConstantExpr *Create(Constant *C,
|
||||
const std::vector<Constant*>&IdxList,
|
||||
const Type *DestTy) {
|
||||
return new(IdxList.size() + 1)
|
||||
GetElementPtrConstantExpr *Result = new(IdxList.size() + 1)
|
||||
GetElementPtrConstantExpr(C, IdxList, DestTy);
|
||||
// Getelementptr defaults to having no pointer overflow.
|
||||
cast<GEPOperator>(Result)->setHasNoPointerOverflow(true);
|
||||
return Result;
|
||||
}
|
||||
/// Transparently provide more efficient getOperand methods.
|
||||
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
||||
|
Loading…
x
Reference in New Issue
Block a user