mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-09 16:45:03 +00:00
Doh!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26705 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0937103368
commit
2352ce9cb6
@ -1740,7 +1740,7 @@ std::string Constant::getStringValue(bool Chop, unsigned Offset) {
|
||||
}
|
||||
} else if (Constant *C = dyn_cast<Constant>(this)) {
|
||||
if (GlobalValue *GV = dyn_cast<GlobalValue>(C))
|
||||
return GV->getStringValue(Offset);
|
||||
return GV->getStringValue(Chop, Offset);
|
||||
else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
|
||||
if (CE->getOpcode() == Instruction::GetElementPtr) {
|
||||
// Turn a gep into the specified offset.
|
||||
@ -1748,7 +1748,7 @@ std::string Constant::getStringValue(bool Chop, unsigned Offset) {
|
||||
cast<Constant>(CE->getOperand(1))->isNullValue() &&
|
||||
isa<ConstantInt>(CE->getOperand(2))) {
|
||||
Offset += cast<ConstantInt>(CE->getOperand(2))->getRawValue();
|
||||
return CE->getOperand(0)->getStringValue(Offset);
|
||||
return CE->getOperand(0)->getStringValue(Chop, Offset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user