mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 01:24:30 +00:00
Move GetConstantStringInfo to lib/Analysis. Remove
string output routine from Constant. Update all callers. Change debug intrinsic api slightly to accomodate move of routine, these now return values instead of strings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52748 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -9973,8 +9973,8 @@ static Instruction *InstCombineLoadCast(InstCombiner &IC, LoadInst &LI,
|
||||
if (ConstantExpr *CE = dyn_cast<ConstantExpr>(CI)) {
|
||||
// Instead of loading constant c string, use corresponding integer value
|
||||
// directly if string length is small enough.
|
||||
const std::string &Str = CE->getOperand(0)->getStringValue();
|
||||
if (!Str.empty()) {
|
||||
std::string Str;
|
||||
if (GetConstantStringInfo(CE->getOperand(0), Str) && !Str.empty()) {
|
||||
unsigned len = Str.length();
|
||||
const Type *Ty = cast<PointerType>(CE->getType())->getElementType();
|
||||
unsigned numBits = Ty->getPrimitiveSizeInBits();
|
||||
|
Reference in New Issue
Block a user