зеркало из https://github.com/microsoft/clang-1.git
[driver] Before applying the working directory check if the input path
is absolute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166808 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
485717e8e4
Коммит
ccb428bb04
|
@ -1018,8 +1018,8 @@ void Driver::BuildInputs(const ToolChain &TC, const DerivedArgList &Args,
|
|||
if (CheckInputsExist && memcmp(Value, "-", 2) != 0) {
|
||||
SmallString<64> Path(Value);
|
||||
if (Arg *WorkDir = Args.getLastArg(options::OPT_working_directory)) {
|
||||
SmallString<64> Directory(WorkDir->getValue(Args));
|
||||
if (llvm::sys::path::is_absolute(Directory.str())) {
|
||||
if (!llvm::sys::path::is_absolute(Path.str())) {
|
||||
SmallString<64> Directory(WorkDir->getValue(Args));
|
||||
llvm::sys::path::append(Directory, Value);
|
||||
Path.assign(Directory);
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
// RUN: %clang -working-directory=%S %S/working-directory-and-abs.c -fsyntax-only
|
Загрузка…
Ссылка в новой задаче