[PATCH] D13482: Revised Initial patch for PS4 toolchain
Jonathan Roelofs via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 13 15:40:26 PDT 2015
jroelofs accepted this revision.
jroelofs added a reviewer: jroelofs.
jroelofs added a comment.
One small suggestion. Otherwise, this still LGTM.
================
Comment at: lib/Driver/ToolChains.cpp:4078
@@ +4077,3 @@
+ // should be <SDK_DIR>/host_tools/bin.
+ const char *EnvValue = getenv("SCE_PS4_SDK_DIR");
+ if (EnvValue && !llvm::sys::fs::exists(EnvValue))
----------------
It might help to structure this:
const char *EnvValue = getenv("SCE_PS4_SDK_DIR");
if (EnvValue && !llvm::sys::fs::exists(EnvValue))
getDriver().Diag(clang::diag::warn_drv_ps4_sdk_dir) << EnvValue;
SmallString<512> PS4SDKDir(EnvValue ? EnvValue : getDriver().Dir);
if (!EnvValue) {
llvm::sys::path::append(PS4SDKDir, "/../../");
}
as:
SmallString<512> PS4SDKDir;
if (const char *EnvValue = getenv("SCE_PS4_SDK_DIR"))
if (!llvm::sys::fs::exists(EnvValue))
getDriver().Diag(clang::diag::warn_drv_ps4_sdk_dir) << EnvValue;
PS4SDKDir = EnvValue;
} else {
PS4SDKDir = getDriver().Dir;
llvm::sys::path::append(PS4SDKDir, "/../../");
}
Repository:
rL LLVM
http://reviews.llvm.org/D13482
More information about the cfe-commits
mailing list