]> granicus.if.org Git - clang/commitdiff
Handle [extern_c] attribute in module printer
authorBen Langmuir <blangmuir@apple.com>
Tue, 13 Jan 2015 17:47:38 +0000 (17:47 +0000)
committerBen Langmuir <blangmuir@apple.com>
Tue, 13 Jan 2015 17:47:38 +0000 (17:47 +0000)
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...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225802 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Module.cpp

index ba3526c334f18e9ab7820c1dcceac666b3b9412d..03f9bd3f329cc8d322072c9b160cc8b4d401f637 100644 (file)
@@ -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";