diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 35263fbe1b2d8a..e6a267621d8b4c 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -4601,12 +4601,12 @@ const char *Driver::GetNamedOutputPath(Compilation &C, const JobAction &JA, } SmallString<128> BasePath(BaseInput); + SmallString<128> ExternalPath(""); StringRef BaseName; // Dsymutil actions should use the full path. if (isa(JA) && C.getArgs().hasArg(options::OPT_dsym_dir)) { - SmallString<128> ExternalPath( - C.getArgs().getLastArg(options::OPT_dsym_dir)->getValue()); + ExternalPath += C.getArgs().getLastArg(options::OPT_dsym_dir)->getValue(); // We use posix style here because the tests (specifically // darwin-dsymutil.c) demonstrate that posix style paths are acceptable // even on Windows and if we don't then the similar test covering this