diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-08-05 09:48:08 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-08-05 09:48:08 +0000 |
commit | 72b90571b1783b17c3f2204cec5ca440edc38bee (patch) | |
tree | a759b482778139e091bdea82a52414247cc30db2 /lib/Sema/Sema.cpp | |
parent | 3f95477f28ef3baaf79001a5654785c8b2075710 (diff) |
Support #pragma weak for PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110323 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r-- | lib/Sema/Sema.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index 2c834f4349..6de4202bae 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -243,6 +243,9 @@ void Sema::ActOnEndOfTranslationUnit() { true)), UnusedStaticFuncs.end()); + if (!CompleteTranslationUnit) + return; + // Check for #pragma weak identifiers that were never declared // FIXME: This will cause diagnostics to be emitted in a non-determinstic // order! Iterating over a densemap like this is bad. @@ -255,9 +258,6 @@ void Sema::ActOnEndOfTranslationUnit() { << I->first; } - if (!CompleteTranslationUnit) - return; - // C99 6.9.2p2: // A declaration of an identifier for an object that has file // scope without an initializer, and without a storage-class |