[PATCH] D27751: Use after move bug fixes
Martin Böhme via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 14 06:09:46 PST 2016
mboehme added inline comments.
================
Comment at: lib/IRReader/IRReader.cpp:39
(const unsigned char *)Buffer->getBufferEnd())) {
+ auto Indentifier = Buffer->getBufferIdentifier();
Expected<std::unique_ptr<Module>> ModuleOrErr = getOwningLazyBitcodeModule(
----------------
Typo: Should be "Identifier"
================
Comment at: lib/IRReader/IRReader.cpp:44
handleAllErrors(std::move(E), [&](ErrorInfoBase &EIB) {
- Err = SMDiagnostic(Buffer->getBufferIdentifier(), SourceMgr::DK_Error,
+ Err = SMDiagnostic(std::move(Indentifier), SourceMgr::DK_Error,
EIB.message());
----------------
This is a StringRef -- no need to move it (don't think it has a move constructor anyway as a move would not be cheaper than a copy).
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:27000
while (Mask.size() > 1 && canWidenShuffleElements(Mask, WidenedMask)) {
+ // No use after move, WidenMask reinitialized in canWidenShuffleElements.
Mask = std::move(WidenedMask);
----------------
Typo: Should be WidenedMask
================
Comment at: tools/llvm-profdata/llvm-profdata.cpp:63
}
-
exitWithError(toString(std::move(E)), Whence);
----------------
Inadvertently deleted empty line?
https://reviews.llvm.org/D27751
More information about the llvm-commits
mailing list