summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2018-05-18 18:33:07 +0000
committerPetr Hosek <phosek@chromium.org>2018-05-18 18:33:07 +0000
commit24b61ac832c79fc1cd2c04437dadca171cda63ed (patch)
tree6a872f7a7b56d8b2eaa275577f86bb46d7e4ea54 /clang/lib/Format/Format.cpp
parentf7b81db7157cf424db8da07351df9528a032567e (diff)
downloadbcm5719-llvm-24b61ac832c79fc1cd2c04437dadca171cda63ed.tar.gz
bcm5719-llvm-24b61ac832c79fc1cd2c04437dadca171cda63ed.zip
[Support] Avoid normalization in sys::getDefaultTargetTriple
The return value of sys::getDefaultTargetTriple, which is derived from -DLLVM_DEFAULT_TRIPLE, is used to construct tool names, default target, and in the future also to control the search path directly; as such it should be used textually, without interpretation by LLVM. Normalization of this value may lead to unexpected results, for example if we configure LLVM with -DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-linux-gnu, normalization will transform that value to x86_64--linux-gnu. Driver will use that value to search for tools prefixed with x86_64--linux-gnu- which may be confusing. This is also inconsistent with the behavior of the --target flag which is taken as-is without any normalization and overrides the value of LLVM_DEFAULT_TARGET_TRIPLE. Users of sys::getDefaultTargetTriple already perform their own normalization as needed, so this change shouldn't impact existing logic. Differential Revision: https://reviews.llvm.org/D46910 llvm-svn: 332750
Diffstat (limited to 'clang/lib/Format/Format.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud