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:
50472c4
)
PR45561: Return a literal string rather than an error string to avoid returning refer...
author
David Blaikie
<dblaikie@gmail.com>
Wed, 15 Apr 2020 21:26:31 +0000
(14:26 -0700)
committer
David Blaikie
<dblaikie@gmail.com>
Wed, 15 Apr 2020 21:27:29 +0000
(14:27 -0700)
Changing the underlying YAML support to allow returning a literal
string, rather than a StringRef, would probably be a bigger refactor so
I didn't do that.
llvm/lib/TextAPI/MachO/TextStub.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/TextAPI/MachO/TextStub.cpp
b/llvm/lib/TextAPI/MachO/TextStub.cpp
index
57e3318
..
db6762f
100644
(file)
--- a/
llvm/lib/TextAPI/MachO/TextStub.cpp
+++ b/
llvm/lib/TextAPI/MachO/TextStub.cpp
@@
-412,8
+412,10
@@
template <> struct ScalarTraits<Target> {
static StringRef input(StringRef Scalar, void *, Target &Value) {
auto Result = Target::create(Scalar);
- if (!Result)
- return toString(Result.takeError());
+ if (!Result) {
+ consumeError(Result.takeError());
+ return "unparsable target";
+ }
Value = *Result;
if (Value.Arch == AK_unknown)