summaryrefslogtreecommitdiffstats
path: root/base/compiler_specific.h
Commit message (Collapse)AuthorAgeFilesLines
* Upgrade AlignedMemory to support dynamic allocations.dalecurtis@chromium.org2012-07-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Adds two new methods: AlignedAlloc and AlignedFree for creating and destroying dynamic aligned allocations respectively. Also adds a helper class, ScopedPtrAlignedFree, for use with scoped_ptr_malloc. AlignedAlloc uses posix_memalign for OS X (now that we're targeting 10.6), Linux and _aligned_alloc() on Windows. Android and NaCl use memalign() since they do not expose posix_memalign() and memalign() is safe to use with free() on those platforms. Also hacks around a bug in Visual C++ where __alignof will sometimes return zero: http://connect.microsoft.com/VisualStudio/feedback/details/682695/c-alignof-fails-to-properly-evalute-alignment-of-dependent-types BUG=none TEST=base_unittests + new test, trybots. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=147988 Review URL: https://chromiumcodereview.appspot.com/10796020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148483 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 147988 - Upgrade AlignedMemory to support dynamic allocations.acolwell@chromium.org2012-07-241-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Adds two new methods: AlignedAlloc and AlignedFree for creating and destroying dynamic aligned allocations respectively. Also adds a helper class, ScopedPtrAlignedFree, for use with scoped_ptr_malloc. AlignedAlloc uses posix_memalign for OS X (now that we're targeting 10.6), Linux and _aligned_alloc() on Windows. Android and NaCl use memalign() since they do not expose posix_memalign() and memalign() is safe to use with free() on those platforms. Also hacks around a bug in Visual C++ where __alignof will sometimes return zero: http://connect.microsoft.com/VisualStudio/feedback/details/682695/c-alignof-fails-to-properly-evalute-alignment-of-dependent-types BUG=none TEST=base_unittests + new test, trybots. Review URL: https://chromiumcodereview.appspot.com/10796020 TBR=dalecurtis@chromium.org Review URL: https://chromiumcodereview.appspot.com/10817021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148016 0039d316-1c4b-4281-b951-d872f2087c98
* Upgrade AlignedMemory to support dynamic allocations.dalecurtis@chromium.org2012-07-231-2/+4
| | | | | | | | | | | | | | | | | | | | | | Adds two new methods: AlignedAlloc and AlignedFree for creating and destroying dynamic aligned allocations respectively. Also adds a helper class, ScopedPtrAlignedFree, for use with scoped_ptr_malloc. AlignedAlloc uses posix_memalign for OS X (now that we're targeting 10.6), Linux and _aligned_alloc() on Windows. Android and NaCl use memalign() since they do not expose posix_memalign() and memalign() is safe to use with free() on those platforms. Also hacks around a bug in Visual C++ where __alignof will sometimes return zero: http://connect.microsoft.com/VisualStudio/feedback/details/682695/c-alignof-fails-to-properly-evalute-alignment-of-dependent-types BUG=none TEST=base_unittests + new test, trybots. Review URL: https://chromiumcodereview.appspot.com/10796020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147988 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-111-1/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* Add ALIGNAS and ALIGNOF macros to ensure proper alignment of ↵jbates@chromium.org2012-02-231-0/+19
| | | | | | | | | | StaticMemorySingletonTraits BUG=95006 Review URL: https://chromiumcodereview.appspot.com/9186057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123270 0039d316-1c4b-4281-b951-d872f2087c98
* Add a stackframe named 'CrashIntentionally' to crashes from about:crash.eroman@chromium.org2012-02-141-2/+11
| | | | | | | | | | This should make it easier to categorize on the crash server. BUG=113231 Review URL: http://codereview.chromium.org/9380026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121798 0039d316-1c4b-4281-b951-d872f2087c98
* Make the comment above NON_EXPORTED_BASE talk about static data.jam@chromium.org2012-02-091-3/+3
| | | | | | Review URL: https://chromiumcodereview.appspot.com/9348065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121204 0039d316-1c4b-4281-b951-d872f2087c98
* Comment on WARN_UNUSED_RESULT about how to defeat it.shess@chromium.org2011-05-201-0/+1
| | | | | | | | | | | | Comment change only. BUG=none TEST=none Review URL: http://codereview.chromium.org/7050022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86022 0039d316-1c4b-4281-b951-d872f2087c98
* net: Add NET_API to net/baservargas@google.com2011-05-181-0/+16
| | | | | | | | BUG=76997 TEST=NONE Review URL: http://codereview.chromium.org/6969077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85785 0039d316-1c4b-4281-b951-d872f2087c98
* Add shutdown trace functionsdavemoore@chromium.org2011-05-091-1/+3
| | | | | | | | | BUG=chromium-os:14737 TEST=None Review URL: http://codereview.chromium.org/6943001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84662 0039d316-1c4b-4281-b951-d872f2087c98
* Roll clang to r124477.thakis@chromium.org2011-02-071-3/+2
| | | | | | | | | | | Also reenable OVERRIDE. BUG=71088 TEST=none Review URL: http://codereview.chromium.org/6250188 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73994 0039d316-1c4b-4281-b951-d872f2087c98
* Disable OVERRIDE for clang for a while.thakis@chromium.org2011-01-271-2/+3
| | | | | | | | | | | This blocks rolling clang, and I need to roll clang for the plugin stuff. BUG=71088 TEST=none Review URL: http://codereview.chromium.org/6329027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72873 0039d316-1c4b-4281-b951-d872f2087c98
* Support OVERRIDE for clang.thakis@chromium.org2011-01-071-0/+2
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6165001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70763 0039d316-1c4b-4281-b951-d872f2087c98
* Add an OVERRIDE macro to our list of compiler-specific annotations.evan@chromium.org2010-10-081-11/+31
| | | | | | | | While I'm at it, add docs and examples to the other annotations. Review URL: http://codereview.chromium.org/3581016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61964 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Add compiler-specific "examine printf format" attributes to printfs.evan@chromium.org2009-11-201-0/+21
| | | | | | | | | | | | Functions that take a printf-style format get a new annotation, which produces a bunch of compiler warnings when you use printf impoperly. This change adds the annotations and fixes the warnings. We now must use PRId64 for 64-bit numbers and the PRIsz for size_t. Review URL: http://codereview.chromium.org/339059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32600 0039d316-1c4b-4281-b951-d872f2087c98
* Platform cleanup in browser/ and porting of few files.phajdan.jr@chromium.org2008-12-171-0/+2
| | | | | | Review URL: http://codereview.chromium.org/14466 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7142 0039d316-1c4b-4281-b951-d872f2087c98
* Generate a warning if the return value of FilePath::Append is ignored.agl@chromium.org2008-11-211-2/+8
| | | | | | | | | | | | There's currently a GCC bug which stops this working for return values which have a destructor. Hopefully this will help someone in the future, with future versions of GCC. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38172 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31742 Review URL: http://codereview.chromium.org/11494 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5871 0039d316-1c4b-4281-b951-d872f2087c98
* Wrap MSVC-specific pragmas. As -Wunknown-pragmas has been disabled for wtf,deanm@chromium.org2008-11-211-0/+5
| | | | | | | | | | some of these sneaked in. BUG=2053 Review URL: http://codereview.chromium.org/11801 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5830 0039d316-1c4b-4281-b951-d872f2087c98
* Unignore most warnings on POSIX in build/SConscript.main.evanm@google.com2008-09-161-0/+8
| | | | | | | | | BUG=2053 Patch from Paweł Hajdan jr <phajdan.jr@gmail.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2272 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the final gcc warnings in base and net. Provide some macros to ↵mmentovai@google.com2008-08-211-0/+80
selectively disable MSVC warnings. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1194 0039d316-1c4b-4281-b951-d872f2087c98