]> granicus.if.org Git - clang/commit
[Driver] Verify GCCInstallation is valid
authorNick Desaulniers <ndesaulniers@google.com>
Tue, 21 May 2019 21:21:35 +0000 (21:21 +0000)
committerNick Desaulniers <ndesaulniers@google.com>
Tue, 21 May 2019 21:21:35 +0000 (21:21 +0000)
commite9f666dff4764e65704d0145c35d57a7467d8e51
tree3e47f64abe3fd855f87776ba0f5af360c195e872
parent667b24c87f4c053082ce43d7a44aff881167231a
[Driver] Verify GCCInstallation is valid

Summary:
Values returned by GCCInstallation.getParentLibPath() and
GCCInstallation.getTriple() are not valid unless
GCCInstallation.isValid() returns true. This has previously been
ignored, and the former two values were used without checking whether
GCCInstallation is valid. This led to the bad path "/../bin" being added
to the list of program paths.

author: danielmentz "Daniel Mentz <danielmentz@google.com>"

Reviewers: #clang, tstellar, srhines

Reviewed By: srhines

Subscribers: danielmentz, ormris, nickdesaulniers, srhines, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D57930

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361314 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/ToolChains/Linux.cpp
test/Driver/B-opt.c