[PATCH] D59254: [RFC] Implementation of Clang randstruct

2019-07-02 Thread Shawn Landden via Phabricator via cfe-commits
shawnl added a comment.

My point is that most languages these days that intend to be compiled to 
machine code want compatibility with the C ABI, and randstruct will be part of 
that (and can be made compatible between languages by sharing the seed). LLVM 
knows what a struct is.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59254/new/

https://reviews.llvm.org/D59254



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D59254: [RFC] Implementation of Clang randstruct

2019-07-02 Thread Shawn Landden via Phabricator via cfe-commits
shawnl added a comment.

I think the essential functionality of this patch should be in LLVM and not 
Clang, so that all front-ends can benefit. Too many generally useful things are 
in Clang when they should be in LLVM (e.g. C ABI for ARM and x86; ranged switch 
statements). I opened an upstream bug to discuss this. 
https://github.com/clang-randstruct/llvm-project/issues/52


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59254/new/

https://reviews.llvm.org/D59254



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D61756: Add a __FILE_NAME__ macro.

2019-05-09 Thread Shawn Landden via Phabricator via cfe-commits
shawnl requested changes to this revision.
shawnl added a comment.
This revision now requires changes to proceed.

There is no documentation specific to the #include directive. 
https://docs.microsoft.com/en-us/cpp/preprocessor/hash-include-directive-c-cpp?view=vs-2019

However, fileio treats / and \ the same, *sometimes*. 
https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61756/new/

https://reviews.llvm.org/D61756



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D61756: Add a __FILE_NAME__ macro.

2019-05-09 Thread Shawn Landden via Phabricator via cfe-commits
shawnl added inline comments.



Comment at: lib/Lex/PPMacroExpansion.cpp:1509
+if (LastSep == StringRef::npos && LangOpts.MicrosoftExt)
+  LastSep = PLFileName.find_last_of('\\');
+

What is the path name uses both \ and / to separate paths? I think this needs 
to be:
```
if (LangOpts.MicrosoftExt) {
  size_t BackSlash = PLFileName.take_back(PLFileName.size() - 
LastSep).find_last_of('\\');
  if (BackSlash != StringRef::npos)
LastSep = BackSlash;
}
```


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61756/new/

https://reviews.llvm.org/D61756



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits