diff options
author | Brian Gesiak <modocache@gmail.com> | 2019-04-02 14:57:56 +0000 |
---|---|---|
committer | Brian Gesiak <modocache@gmail.com> | 2019-04-02 14:57:56 +0000 |
commit | 1c44ed8b76111e66e0dd25bc074daa2006f692ce (patch) | |
tree | 5040726f4217406d6f5f8642a527dd1960710a27 /llvm/lib | |
parent | 3bf63cf3b366d3a57cf5cbad4112a6abf6c0c3b1 (diff) | |
download | bcm5719-llvm-1c44ed8b76111e66e0dd25bc074daa2006f692ce.tar.gz bcm5719-llvm-1c44ed8b76111e66e0dd25bc074daa2006f692ce.zip |
[Transforms] Redundant getValueOperand (NFC)
`StoreInst::getValueOperand` is identical to `getOperand(0)`, so the call to
`getOperand(0)` can be replaced. Further, `SI->getValueOperand` is redundantly
called just a few lines down, despite its return value being stored in variable
`DV`. No functional change.
llvm-svn: 357479
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 9271e1dda5a..429ae85596f 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -1292,9 +1292,9 @@ void llvm::ConvertDebugDeclareToDebugValue(DbgVariableIntrinsic *DII, auto *DIVar = DII->getVariable(); assert(DIVar && "Missing variable"); auto *DIExpr = DII->getExpression(); - Value *DV = SI->getOperand(0); + Value *DV = SI->getValueOperand(); - if (!valueCoversEntireFragment(SI->getValueOperand()->getType(), DII)) { + if (!valueCoversEntireFragment(DV->getType(), DII)) { // FIXME: If storing to a part of the variable described by the dbg.declare, // then we want to insert a dbg.value for the corresponding fragment. LLVM_DEBUG(dbgs() << "Failed to convert dbg.declare to dbg.value: " |