aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/Module.cpp
diff options
context:
space:
mode:
authorBen Langmuir <blangmuir@apple.com>2015-01-13 17:47:38 +0000
committerBen Langmuir <blangmuir@apple.com>2015-01-13 17:47:38 +0000
commit7615f00e5188e50180f9e2f62c24d50191038bdd (patch)
treec5797401a558790704b0043a6dea7d0909bb0f3a /clang/lib/Basic/Module.cpp
parentd3d7f3b5bd8467c60e3b223d6d10366e6d2e0c90 (diff)
downloadllvm-7615f00e5188e50180f9e2f62c24d50191038bdd.zip
llvm-7615f00e5188e50180f9e2f62c24d50191038bdd.tar.gz
llvm-7615f00e5188e50180f9e2f62c24d50191038bdd.tar.bz2
Handle [extern_c] attribute in module printer
I'm not sure why we have OS.indent(Indent+2) for the system attribute, but presumably we want the same behaviour for all attributes... llvm-svn: 225802
Diffstat (limited to 'clang/lib/Basic/Module.cpp')
-rw-r--r--clang/lib/Basic/Module.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Basic/Module.cpp b/clang/lib/Basic/Module.cpp
index ba3526c..03f9bd3 100644
--- a/clang/lib/Basic/Module.cpp
+++ b/clang/lib/Basic/Module.cpp
@@ -293,9 +293,12 @@ void Module::print(raw_ostream &OS, unsigned Indent) const {
OS << "explicit ";
OS << "module " << Name;
- if (IsSystem) {
+ if (IsSystem || IsExternC) {
OS.indent(Indent + 2);
- OS << " [system]";
+ if (IsSystem)
+ OS << " [system]";
+ if (IsExternC)
+ OS << " [extern_c]";
}
OS << " {\n";