summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-02-19 22:20:19 +0000
committerdim <dim@FreeBSD.org>2015-02-19 22:20:19 +0000
commit1e024675bcd5e4ace8bffb2dd6afd3fa8b8ad7f3 (patch)
tree84663adb8262b7962030778aaba745cd98e8b356 /contrib/llvm/tools/clang/lib
parent184b3c7999c408b8e298b506ccfdff9d81c9ffd5 (diff)
parent49b6407b6cc89756540e2097c1cf8b9bb4a422e1 (diff)
downloadFreeBSD-src-1e024675bcd5e4ace8bffb2dd6afd3fa8b8ad7f3.zip
FreeBSD-src-1e024675bcd5e4ace8bffb2dd6afd3fa8b8ad7f3.tar.gz
Merge llvm 3.6.0rc4 from ^/vendor/llvm/dist, merge clang 3.6.0rc4 from
^/vendor/clang/dist, resolve conflicts, and update patches.
Diffstat (limited to 'contrib/llvm/tools/clang/lib')
-rw-r--r--contrib/llvm/tools/clang/lib/Basic/Version.cpp2
-rw-r--r--contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp18
-rw-r--r--contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp3
3 files changed, 10 insertions, 13 deletions
diff --git a/contrib/llvm/tools/clang/lib/Basic/Version.cpp b/contrib/llvm/tools/clang/lib/Basic/Version.cpp
index 0520cfb..d42628a 100644
--- a/contrib/llvm/tools/clang/lib/Basic/Version.cpp
+++ b/contrib/llvm/tools/clang/lib/Basic/Version.cpp
@@ -36,7 +36,7 @@ std::string getClangRepositoryPath() {
// If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us
// pick up a tag in an SVN export, for example.
- StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc3/lib/Basic/Version.cpp $");
+ StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc4/lib/Basic/Version.cpp $");
if (URL.empty()) {
URL = SVNRepository.slice(SVNRepository.find(':'),
SVNRepository.find("/lib/Basic"));
diff --git a/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp b/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp
index 6ad3495..39cc7e5 100644
--- a/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp
+++ b/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp
@@ -2134,19 +2134,15 @@ ABIArgInfo X86_64ABIInfo::getIndirectResult(QualType Ty,
return ABIArgInfo::getIndirect(Align);
}
-/// GetByteVectorType - The ABI specifies that a value should be passed in an
-/// full vector XMM/YMM register. Pick an LLVM IR type that will be passed as a
-/// vector register.
+/// The ABI specifies that a value should be passed in a full vector XMM/YMM
+/// register. Pick an LLVM IR type that will be passed as a vector register.
llvm::Type *X86_64ABIInfo::GetByteVectorType(QualType Ty) const {
- llvm::Type *IRType = CGT.ConvertType(Ty);
+ // Wrapper structs/arrays that only contain vectors are passed just like
+ // vectors; strip them off if present.
+ if (const Type *InnerTy = isSingleElementStruct(Ty, getContext()))
+ Ty = QualType(InnerTy, 0);
- // Wrapper structs that just contain vectors are passed just like vectors,
- // strip them off if present.
- llvm::StructType *STy = dyn_cast<llvm::StructType>(IRType);
- while (STy && STy->getNumElements() == 1) {
- IRType = STy->getElementType(0);
- STy = dyn_cast<llvm::StructType>(IRType);
- }
+ llvm::Type *IRType = CGT.ConvertType(Ty);
// If the preferred type is a 16-byte vector, prefer to pass it.
if (llvm::VectorType *VT = dyn_cast<llvm::VectorType>(IRType)){
diff --git a/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp b/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp
index 4d97ab3..f789fd5 100644
--- a/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp
+++ b/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp
@@ -3154,7 +3154,8 @@ void Linux::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
SmallVector<StringRef, 5> dirs;
CIncludeDirs.split(dirs, ":");
for (StringRef dir : dirs) {
- StringRef Prefix = llvm::sys::path::is_absolute(dir) ? SysRoot : "";
+ StringRef Prefix =
+ llvm::sys::path::is_absolute(dir) ? StringRef(SysRoot) : "";
addExternCSystemInclude(DriverArgs, CC1Args, Prefix + dir);
}
return;
OpenPOWER on IntegriCloud