llvm.org GIT mirror llvm / 6e6c6de
gold-plugin: Add the file path to the file open error diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293013 91177308-0d34-0410-b5e6-96231b3b80d8 Peter Collingbourne 3 years ago
2 changed file(s) with 10 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as -o %t %s
1 ; RUN: not %gold -plugin %llvmshlibdir/LLVMgold.so \
2 ; RUN: --plugin-opt=obj-path=%T/nonexistent-dir/foo.o \
3 ; RUN: %t -o %t2 2>&1 | FileCheck %s
4
5 ; CHECK: Could not open file {{.*}}nonexistent-dir
6
7 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
825825 std::error_code EC =
826826 sys::fs::openFileForWrite(Filenames[Task], FD, sys::fs::F_None);
827827 if (EC)
828 message(LDPL_FATAL, "Could not open file: %s", EC.message().c_str());
828 message(LDPL_FATAL, "Could not open file %s: %s", Filenames[Task].c_str(),
829 EC.message().c_str());
829830 return llvm::make_unique(
830831 llvm::make_unique(FD, true));
831832 };