aboutsummaryrefslogtreecommitdiff
path: root/lib/Serialization/ASTWriter.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2013-02-01 08:13:20 +0000
committerNick Lewycky <nicholas@mxc.ca>2013-02-01 08:13:20 +0000
commitcd0655b17249c4c4908ca91462657f62285017e6 (patch)
treef591e7ddc3ef7fdc95b065a9ae56a34d7b42c906 /lib/Serialization/ASTWriter.cpp
parentbe507b6e72df8ab5e7d8c31eb4453e1bdf5fcfaf (diff)
Add a new -Wundefined-inline warning for inline functions which are used but not
defined. Fixes PR14993! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174158 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriter.cpp')
-rw-r--r--lib/Serialization/ASTWriter.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp
index 8120799c11..2d975466b5 100644
--- a/lib/Serialization/ASTWriter.cpp
+++ b/lib/Serialization/ASTWriter.cpp
@@ -824,7 +824,7 @@ void ASTWriter::WriteBlockInfoBlock() {
RECORD(OPENCL_EXTENSIONS);
RECORD(DELEGATING_CTORS);
RECORD(KNOWN_NAMESPACES);
- RECORD(UNDEFINED_INTERNALS);
+ RECORD(UNDEFINED_BUT_USED);
RECORD(MODULE_OFFSET_MAP);
RECORD(SOURCE_MANAGER_LINE_TABLE);
RECORD(OBJC_CATEGORIES_MAP);
@@ -3588,15 +3588,15 @@ void ASTWriter::WriteASTCore(Sema &SemaRef,
AddDeclRef(I->first, KnownNamespaces);
}
- // Build a record of all used, undefined objects with internal linkage.
- RecordData UndefinedInternals;
+ // Build a record of all used, undefined objects that require definitions.
+ RecordData UndefinedButUsed;
SmallVector<std::pair<NamedDecl *, SourceLocation>, 16> Undefined;
- SemaRef.getUndefinedInternals(Undefined);
+ SemaRef.getUndefinedButUsed(Undefined);
for (SmallVectorImpl<std::pair<NamedDecl *, SourceLocation> >::iterator
I = Undefined.begin(), E = Undefined.end(); I != E; ++I) {
- AddDeclRef(I->first, UndefinedInternals);
- AddSourceLocation(I->second, UndefinedInternals);
+ AddDeclRef(I->first, UndefinedButUsed);
+ AddSourceLocation(I->second, UndefinedButUsed);
}
// Write the control block
@@ -3814,9 +3814,9 @@ void ASTWriter::WriteASTCore(Sema &SemaRef,
if (!KnownNamespaces.empty())
Stream.EmitRecord(KNOWN_NAMESPACES, KnownNamespaces);
- // Write the undefined internal functions and variables.
- if (!UndefinedInternals.empty())
- Stream.EmitRecord(UNDEFINED_INTERNALS, UndefinedInternals);
+ // Write the undefined internal functions and variables, and inline functions.
+ if (!UndefinedButUsed.empty())
+ Stream.EmitRecord(UNDEFINED_BUT_USED, UndefinedButUsed);
// Write the visible updates to DeclContexts.
for (llvm::SmallPtrSet<const DeclContext *, 16>::iterator