Richard, is there any precedent for synthesizing VarDecls and things like 
this?  Is it worth taking the time to model these globals in the AST, or should 
we keep synthesizing them in codegen?


================
Comment at: lib/CodeGen/CodeGenModule.cpp:1052
@@ -1062,2 +1051,3 @@
+  StringRef Uuid = E->getUuidAsStringRef(Context);
   std::string Name = "_GUID_" + Uuid.lower();
   std::replace(Name.begin(), Name.end(), '-', '_');
----------------
It seems unfortunate that we're duplicating this computation.  We could raise 
it up into CXXUuidOfExpr.

================
Comment at: lib/AST/MicrosoftMangle.cpp:867
@@ +866,3 @@
+  if (UE) {
+    StringRef Uuid = UE->getUuidAsStringRef(Context.getASTContext());
+    std::string Name = "_GUID_" + Uuid.lower();
----------------
Please put a comment here about what mangling we're emulating.  It's a 
DeclRefExpr to a global struct of type __s_GUID with the uuid in the name?


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

Reply via email to