[cfe-commits] [PATCH] libc++ visibility fixes

Dimitry Andric dimitry at andric.com
Mon Sep 10 13:51:49 PDT 2012


Hi,

Some time ago, I reported PR 13688, which is about building Firefox with
libc++ (usually in C++11 mode).  Firefox uses visibility pragmas for
various reasons, one of which boils down to:

   #pragma GCC visibility push(default)
   #include <iterator>

Since Rafael suggested the most probable solution of the PR is to
correct libc++, and I agree, I took a shot at making most of the
visibility declarations consistent.  A patch for this is attached.

My testcase is to compile all the libc++ headers, preceding this with a
#pragma GCC visibility push(default).  See the attached .cpp file.

In a follow-up post, I will attempt to do the same for when the first
line of the testcase is #pragma GCC visibility push(hidden).  This leads
to a whole bunch of other errors, which have only been partially solved
by the fix for PR 13662.

-Dimitry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libcxx-visibility-default-2.diff
Type: text/x-diff
Size: 12208 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120910/b5776faa/attachment.diff>
-------------- next part --------------
#pragma GCC visibility push(default)
#include <algorithm>
#include <array>
#include <atomic>
#include <bitset>
#include <cassert>
#include <ccomplex>
#include <cctype>
#include <cerrno>
#include <cfenv>
#include <cfloat>
#include <chrono>
#include <cinttypes>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <codecvt>
#include <complex>
#include <condition_variable>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstdbool>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctgmath>
#include <ctime>
#include <cwchar>
#include <cwctype>
#include <deque>
#include <exception>
#include <ext/hash_map>
#include <ext/hash_set>
#include <forward_list>
#include <fstream>
#include <functional>
#include <future>
#include <initializer_list>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <mutex>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <strstream>
#include <system_error>
#include <thread>
#include <tuple>
#include <type_traits>
#include <typeindex>
#include <typeinfo>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <valarray>
#include <vector>


More information about the cfe-commits mailing list