projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
91720ee
)
DWARFYAML::emitDebugSections - fix use after std::move warnings. NFCI.
author
Simon Pilgrim
<llvm-dev@redking.me.uk>
Sun, 20 Sep 2020 13:42:36 +0000
(14:42 +0100)
committer
Simon Pilgrim
<llvm-dev@redking.me.uk>
Sun, 20 Sep 2020 13:42:36 +0000
(14:42 +0100)
We were using Err after it had been moved into cantFail - avoid this by calling cantFail with Error::success() directly.
llvm/lib/ObjectYAML/DWARFEmitter.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/ObjectYAML/DWARFEmitter.cpp
b/llvm/lib/ObjectYAML/DWARFEmitter.cpp
index
b634f7c
..
eaf68df
100644
(file)
--- a/
llvm/lib/ObjectYAML/DWARFEmitter.cpp
+++ b/
llvm/lib/ObjectYAML/DWARFEmitter.cpp
@@
-1033,9
+1033,10
@@
DWARFYAML::emitDebugSections(StringRef YAMLString, bool IsLittleEndian,
if (YIn.error())
return createStringError(YIn.error(), GeneratedDiag.getMessage());
+ cantFail(Error::success());
+
StringMap<std::unique_ptr<MemoryBuffer>> DebugSections;
Error Err = Error::success();
- cantFail(std::move(Err));
for (StringRef SecName : DI.getNonEmptySectionNames())
Err = joinErrors(std::move(Err),