[PATCH] [-cxx-abi microsoft] Mangle __uuidof correctly into template parameters

Reid Kleckner rnk at google.com
Mon Aug 12 18:51:21 PDT 2013


  LGTM


================
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(), '-', '_');
----------------
David Majnemer wrote:
> Reid Kleckner wrote:
> > It seems unfortunate that we're duplicating this computation.  We could raise it up into CXXUuidOfExpr.
> They are sorta different semantically because you can end up with a template arg harboring a __uuidof expression but no global constant emitted. I don't know what you would call the combination of _GUID_ prefix and UUID lower-case suffix.
> 
> They would be semantically related if they had something to do with a VarDecl or some such entity.
Eh, OK.


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

BRANCH
  PR16836

ARCANIST PROJECT
  clang



More information about the cfe-commits mailing list