[PATCH] [-cxx-abi microsoft] Mangle declarations inside of extern "C" functions

Timur Iskhodzhanov timurrrr at google.com
Mon Sep 9 01:27:48 PDT 2013



================
Comment at: lib/AST/MicrosoftMangle.cpp:258
@@ +257,3 @@
+      while (!DC->isNamespace() && !DC->isTranslationUnit())
+        DC = getEffectiveParentContext(DC);
+    if (DC->isTranslationUnit() && D->getFormalLinkage() == InternalLinkage &&
----------------
please add an empty line below

================
Comment at: lib/AST/MicrosoftMangle.cpp:284
@@ +283,3 @@
+  if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
+    if (FD->isMain()) {
+      Out << "$1main";
----------------
Please add a comment explaining why the rest of the code can't handle "main" well on its own.

================
Comment at: lib/AST/MicrosoftMangle.cpp:958
@@ -901,1 +957,3 @@
+void MicrosoftCXXNameMangler::mangleTemplateArgs(
+    const TemplateDecl *TD, const TemplateArgumentList &TemplateArgs) {
   // <template-args> ::= {<type> | <integer-literal>}+ @
----------------
Do we need TD here anymore?


http://llvm-reviews.chandlerc.com/D1627



More information about the cfe-commits mailing list