================
Comment at: cfe/trunk/lib/AST/MicrosoftMangle.cpp:83-95
@@ +82,15 @@
+// unit.
+static bool isUserDefinedEntryPoint(const FunctionDecl *FD) {
+  if (!FD->getIdentifier())
+    return false;
+
+  return llvm::StringSwitch<bool>(FD->getName())
+      .Cases("main",     // An ANSI console app
+             "wmain",    // A Unicode console App
+             "WinMain",  // An ANSI GUI app
+             "wWinMain", // A Unicode GUI app
+             "DllMain",  // A DLL
+             true)
+      .Default(false);
+}
+
----------------
You should also check that the function was declared in the translation unit 
(and not, say, in a namespace or as a member function).


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

COMMIT
  http://llvm-reviews.chandlerc.com/rL190675
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to