summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index/IndexSymbol.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-07-07 20:04:28 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-07-07 20:04:28 +0000
commit1283e9868d2c1cbf31a834bb5151af6d046c1cb3 (patch)
treed8a0ea5f202e996293ae22a4487e81b466174cad /clang/lib/Index/IndexSymbol.cpp
parent77235d345eb11a3705fbb93196eb7817734402a9 (diff)
downloadbcm5719-llvm-1283e9868d2c1cbf31a834bb5151af6d046c1cb3.tar.gz
bcm5719-llvm-1283e9868d2c1cbf31a834bb5151af6d046c1cb3.zip
[modules ts] Basic for module linkage.
In addition to the formal linkage rules, the Modules TS includes cases where internal-linkage symbols within a module interface unit can be referenced from outside the module via exported inline functions / templates. We give such declarations "module-internal linkage", which is formally internal linkage, but results in an externally-visible symbol. llvm-svn: 307434
Diffstat (limited to 'clang/lib/Index/IndexSymbol.cpp')
-rw-r--r--clang/lib/Index/IndexSymbol.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Index/IndexSymbol.cpp b/clang/lib/Index/IndexSymbol.cpp
index bf358a37214..0dc3720208c 100644
--- a/clang/lib/Index/IndexSymbol.cpp
+++ b/clang/lib/Index/IndexSymbol.cpp
@@ -69,11 +69,13 @@ bool index::isFunctionLocalSymbol(const Decl *D) {
if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
switch (ND->getFormalLinkage()) {
case NoLinkage:
- case VisibleNoLinkage:
case InternalLinkage:
return true;
+ case VisibleNoLinkage:
case UniqueExternalLinkage:
+ case ModuleInternalLinkage:
llvm_unreachable("Not a sema linkage");
+ case ModuleLinkage:
case ExternalLinkage:
return false;
}
OpenPOWER on IntegriCloud