[llvm-branch-commits] [cfe-branch] r144262 - in /cfe/branches/release_30: ./ include/clang/Basic/Builtins.def lib/Driver/ToolChains.cpp lib/Driver/ToolChains.h test/Analysis/security-syntax-checks.m test/SemaCXX/warn-unreachable.cpp
Bill Wendling
isanbard at gmail.com
Wed Nov 9 20:22:48 PST 2011
Author: void
Date: Wed Nov 9 22:22:48 2011
New Revision: 144262
URL: http://llvm.org/viewvc/llvm-project?rev=144262&view=rev
Log:
Merging r142531:
------------------------------------------------------------------------
r142531 | rafael | 2011-10-19 07:50:34 -0700 (Wed, 19 Oct 2011) | 3 lines
Fix the signatures of vfork, __sigsetjmp and sigsetjmp.
Patch by Dimitry Andric.
------------------------------------------------------------------------
Modified:
cfe/branches/release_30/ (props changed)
cfe/branches/release_30/include/clang/Basic/Builtins.def
cfe/branches/release_30/lib/Driver/ToolChains.cpp
cfe/branches/release_30/lib/Driver/ToolChains.h
cfe/branches/release_30/test/Analysis/security-syntax-checks.m
cfe/branches/release_30/test/SemaCXX/warn-unreachable.cpp (props changed)
Propchange: cfe/branches/release_30/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Nov 9 22:22:48 2011
@@ -1,3 +1,3 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:142113,142133-142134,142187,142349,142474,142476,142918,143344-143345,143684,143686-143687,143751-143752,143798,143801,143804-143807,143822-143823,143836,143838-143842,143863,143866,143869,143871,143873-143875,143896-143897,143916-143917
+/cfe/trunk:142113,142133-142134,142187,142349,142474,142476,142531,142918,143344-143345,143684,143686-143687,143751-143752,143798,143801,143804-143807,143822-143823,143836,143838-143842,143863,143866,143869,143871,143873-143875,143896-143897,143916-143917
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_30/include/clang/Basic/Builtins.def
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_30/include/clang/Basic/Builtins.def?rev=144262&r1=144261&r2=144262&view=diff
==============================================================================
--- cfe/branches/release_30/include/clang/Basic/Builtins.def (original)
+++ cfe/branches/release_30/include/clang/Basic/Builtins.def Wed Nov 9 22:22:48 2011
@@ -672,16 +672,16 @@
LIBBUILTIN(bzero, "vv*z", "f", "strings.h", ALL_LANGUAGES)
// POSIX unistd.h
LIBBUILTIN(_exit, "vi", "fr", "unistd.h", ALL_LANGUAGES)
-LIBBUILTIN(vfork, "iJ", "fj", "unistd.h", ALL_LANGUAGES)
+LIBBUILTIN(vfork, "i", "fj", "unistd.h", ALL_LANGUAGES)
// POSIX setjmp.h
// In some systems setjmp is a macro that expands to _setjmp. We undefine
// it here to avoid having two identical LIBBUILTIN entries.
#undef setjmp
LIBBUILTIN(_setjmp, "iJ", "fj", "setjmp.h", ALL_LANGUAGES)
-LIBBUILTIN(__sigsetjmp, "iJ", "fj", "setjmp.h", ALL_LANGUAGES)
+LIBBUILTIN(__sigsetjmp, "iJi", "fj", "setjmp.h", ALL_LANGUAGES)
LIBBUILTIN(setjmp, "iJ", "fj", "setjmp.h", ALL_LANGUAGES)
-LIBBUILTIN(sigsetjmp, "iJ", "fj", "setjmp.h", ALL_LANGUAGES)
+LIBBUILTIN(sigsetjmp, "iJi", "fj", "setjmp.h", ALL_LANGUAGES)
LIBBUILTIN(setjmp_syscall, "iJ", "fj", "setjmp.h", ALL_LANGUAGES)
LIBBUILTIN(savectx, "iJ", "fj", "setjmp.h", ALL_LANGUAGES)
LIBBUILTIN(qsetjmp, "iJ", "fj", "setjmp.h", ALL_LANGUAGES)
Modified: cfe/branches/release_30/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_30/lib/Driver/ToolChains.cpp?rev=144262&r1=144261&r2=144262&view=diff
==============================================================================
--- cfe/branches/release_30/lib/Driver/ToolChains.cpp (original)
+++ cfe/branches/release_30/lib/Driver/ToolChains.cpp Wed Nov 9 22:22:48 2011
@@ -1629,7 +1629,7 @@
if (!llvm::sys::fs::exists(LibDir))
continue;
for (unsigned k = 0, ke = CandidateTriples.size(); k < ke; ++k)
- ScanLibDirForGCCTriple(LibDir, CandidateTriples[k]);
+ ScanLibDirForGCCTriple(HostArch, LibDir, CandidateTriples[k]);
}
}
}
@@ -1695,7 +1695,8 @@
}
void Linux::GCCInstallationDetector::ScanLibDirForGCCTriple(
- const std::string &LibDir, StringRef CandidateTriple) {
+ llvm::Triple::ArchType HostArch, const std::string &LibDir,
+ StringRef CandidateTriple) {
// There are various different suffixes involving the triple we
// check for. We also record what is necessary to walk from each back
// up to the lib directory.
@@ -1707,7 +1708,7 @@
// match.
// FIXME: It may be worthwhile to generalize this and look for a second
// triple.
- "/" + CandidateTriple.str() + "/gcc/i686-linux-gnu"
+ "/i386-linux-gnu/gcc/" + CandidateTriple.str()
};
const std::string InstallSuffixes[] = {
"/../../..",
@@ -1716,7 +1717,7 @@
};
// Only look at the final, weird Ubuntu suffix for i386-linux-gnu.
const unsigned NumSuffixes = (llvm::array_lengthof(Suffixes) -
- (CandidateTriple != "i386-linux-gnu"));
+ (HostArch != llvm::Triple::x86));
for (unsigned i = 0; i < NumSuffixes; ++i) {
StringRef Suffix = Suffixes[i];
llvm::error_code EC;
Modified: cfe/branches/release_30/lib/Driver/ToolChains.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_30/lib/Driver/ToolChains.h?rev=144262&r1=144261&r2=144262&view=diff
==============================================================================
--- cfe/branches/release_30/lib/Driver/ToolChains.h (original)
+++ cfe/branches/release_30/lib/Driver/ToolChains.h Wed Nov 9 22:22:48 2011
@@ -445,7 +445,8 @@
SmallVectorImpl<StringRef> &LibDirs,
SmallVectorImpl<StringRef> &Triples);
- void ScanLibDirForGCCTriple(const std::string &LibDir,
+ void ScanLibDirForGCCTriple(llvm::Triple::ArchType HostArch,
+ const std::string &LibDir,
StringRef CandidateTriple);
};
Modified: cfe/branches/release_30/test/Analysis/security-syntax-checks.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_30/test/Analysis/security-syntax-checks.m?rev=144262&r1=144261&r2=144262&view=diff
==============================================================================
--- cfe/branches/release_30/test/Analysis/security-syntax-checks.m (original)
+++ cfe/branches/release_30/test/Analysis/security-syntax-checks.m Wed Nov 9 22:22:48 2011
@@ -170,7 +170,7 @@
//===----------------------------------------------------------------------===
typedef int __int32_t;
typedef __int32_t pid_t;
-pid_t vfork(void); //expected-warning{{declaration of built-in function 'vfork' requires inclusion of the header <setjmp.h>}}
+pid_t vfork(void);
void test_vfork() {
vfork(); //expected-warning{{Call to function 'vfork' is insecure as it can lead to denial of service situations in the parent process.}}
Propchange: cfe/branches/release_30/test/SemaCXX/warn-unreachable.cpp
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Nov 9 22:22:48 2011
@@ -1,2 +1,2 @@
/cfe/branches/type-system-rewrite/test/SemaCXX/warn-unreachable.cpp:134693-134817
-/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,142113,142133-142134,142187,142349,142474,142476,142918,143344-143345
+/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,142113,142133-142134,142187,142349,142474,142476,142531,142918,143344-143345
More information about the llvm-branch-commits
mailing list