llvm-capstone/clang/utils
Justin Lebar 4086fe5cd1 [TableGen] Only normalize the spelling of GNU-style attributes.
Summary:
When Sema looks up an attribute name, it strips off leading and trailing
"__" if the attribute is GNU-style.  That is, __attribute__((foo)) and
__attribute__((__foo__)) are equivalent.

This is only true for GNU-style attributes.  In particular,
__declspec(__foo__) is not equivalent to __declspec(foo), and Sema
respects this difference.

This patch fixes TableGen to match Sema's behavior.  The spelling
'GNU<"__foo__">' should be normalized to 'GNU<"foo">', but
'Declspec<"__foo__">' should not be changed.

This is necessary to make CUDA compilation work on Windows, because e.g.
the __device__ attribute is spelled __declspec(__device__).

Attr.td does not contain any Declspec spellings that start or end with
"__", so this change should not affect any other attributes.

Reviewers: rnk

Subscribers: cfe-commits, tra

Differential Revision: https://reviews.llvm.org/D28318

llvm-svn: 291129
2017-01-05 16:51:54 +00:00
..
ABITest Add back the ABITest makefiles 2016-02-03 17:16:01 +00:00
analyzer [analyzer] SATestBuild.py: Treat '#' as comment in projectMap.csv 2016-09-19 01:36:40 +00:00
check_cfc
CIndex
ClangVisualizers Improved Visual Studio visualization of OpaquePtr 2016-06-13 04:02:35 +00:00
perf-training [clang] Update lit config in utils/perf-training 2017-01-04 04:33:28 +00:00
TableGen [TableGen] Only normalize the spelling of GNU-style attributes. 2017-01-05 16:51:54 +00:00
TestUtils
valgrind
VtableTest
builtin-defines.c
CaptureCmd
ClangDataFormat.py
CmpDriver
find-unused-diagnostics.sh
FindSpecRefs
FuzzTest
modfuzz.py Add simple, stupid, pattern-based fuzzer / reducer for modules bugs. I've 2016-06-27 19:43:46 +00:00
token-delta.py