Details
Details
- Reviewers
martell ruiu rnk - Commits
- rG721a2770e68e: Merging r311068: --------------------------------------------------------------…
rG9d8ecb4333a4: [llvm-dlltool] Don't crash if no def file is provided or it can't be opened
rL311104: Merging r311068:
rL311068: [llvm-dlltool] Don't crash if no def file is provided or it can't be opened
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM
lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp | ||
---|---|---|
67 | openFile is a function name and shouldn't be reported as part of an error message. It should be something like "cannot open file " << Path << ": " << EC.message() << "\n". But this is not new code, so we don't have to address it in this patch. | |
120–128 | I feel this way is more readable. if (!Args.hasArg(OPT_d)) llvm::errs() << "no definition file specified\n"; return 1; } Optional<MemoryBufferRef> MB = openFile(Args.getLastArg(OPT_d)->getValue()); if (!MB) return 1; |
openFile is a function name and shouldn't be reported as part of an error message. It should be something like "cannot open file " << Path << ": " << EC.message() << "\n".
But this is not new code, so we don't have to address it in this patch.