Skip to content

Commit 4856a42

Browse files
committed
add notes
llvm-svn: 38990
1 parent 14a1b64 commit 4856a42

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

clang/NOTES.txt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ int bar() { return X; }
7373
When compiling for powerpc, the #define is skipped, so it doesn't know that bar
7474
uses a #define that is set on some other target. In practice, limited cases
7575
could be handled by scanning the skipped region of a #if, but the fully general
76-
case cannot be implemented efficiently. In particular, code like this (from
76+
case cannot be implemented efficiently. In this case, for example, the #define
77+
in the protected region could be turned into either a #define_target or
78+
#define_other_target as appropriate. The harder case is code like this (from
7779
OSByteOrder.h):
7880

7981
#if (defined(__ppc__) || defined(__ppc64__))
@@ -84,9 +86,9 @@ OSByteOrder.h):
8486
#include <libkern/machine/OSByteOrder.h>
8587
#endif
8688

87-
... should be fixed by having an initial #ifdef __llvm__ that defines its
88-
contents in terms of the llvm bswap intrinsics. Other things should be handled
89-
on a case-by-case basis.
89+
The realistic way to fix this is by having an initial #ifdef __llvm__ that
90+
defines its contents in terms of the llvm bswap intrinsics. Other things should
91+
be handled on a case-by-case basis.
9092

9193

9294
We probably have to do something smarter like this in the future. The C++ header
@@ -129,6 +131,8 @@ the decl for these ivars.
129131

130132
An ideal way to solve this issue is to mark __DARWIN_LDBL_COMPAT /
131133
__DARWIN_LDBL_COMPAT2 / __DARWIN_LONG_DOUBLE_IS_DOUBLE as being non-portable
132-
because they depend on non-portable macros.
134+
because they depend on non-portable macros. In practice though, this may end
135+
up being a serious problem: every use of printf will mark the translation unit
136+
non-portable if targetting ppc32 and something else.
133137

134138
//===---------------------------------------------------------------------===//

clang/README.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ Preprocessor:
147147
* #assert/#unassert
148148
* #line / #file directives
149149
* MSExtension: "L#param" stringizes to a wide string literal.
150+
* Consider merging the parser's expression parser into the preprocessor to
151+
eliminate duplicate code.
150152

151153
Traditional Preprocessor:
152154
* All.
@@ -166,6 +168,9 @@ Parser Actions:
166168
AST Builder:
167169
* Implement more nodes as actions are available.
168170
* Types.
171+
* Allow the AST Builder to be subclassed. This will allow clients to extend it
172+
and create their own specialized nodes for specific scenarios. Maybe the
173+
"full loc info" use case is just one extension.
169174

170175
Fast #Import:
171176
* All.

0 commit comments

Comments
 (0)