llvm-project/clang/lib/Frontend
Dylan Noblesmith 673728fe57 Preprocessor: add __BYTE_ORDER__ predefined macro
The __BYTE_ORDER__ predefined macro was added in GCC 4.6:
http://gcc.gnu.org/onlinedocs/gcc-4.6.0/cpp/Common-Predefined-Macros.html

It's used like the following:

 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
 ...
 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
 ...
 #else
 #error insane architecture like the pdp-11
 #endif

There's a similar macro, __FLOAT_WORD_ORDER__, but it looks like it
mainly exist to accommodate fairly obscure architectures and ARM's
old FPA instructions, so it doesn't seem nearly as useful.

The tests are updated to check for the correct(at least, based on
clang's current output) value of the macro on each target. So now the
suite will catch bugs like the one fixed in r157626.

llvm-svn: 160879
2012-07-27 18:34:31 +00:00
..
ASTConsumers.cpp Added -ast-dump-filter option to clang -cc1. 2012-07-26 16:01:23 +00:00
ASTMerge.cpp Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). 2012-03-11 07:00:24 +00:00
ASTUnit.cpp Introduce a flag in SourceManager to treat non-system source files 2012-07-11 20:59:04 +00:00
CMakeLists.txt clang/lib: [CMake] Update tblgen'd dependencies. 2012-07-27 06:18:33 +00:00
CacheTokens.cpp Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). 2012-03-11 07:00:24 +00:00
ChainedDiagnosticConsumer.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
ChainedIncludesSource.cpp Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). 2012-03-11 07:00:24 +00:00
CompilerInstance.cpp Add a new libclang completion API to get brief documentation comment that is 2012-07-02 17:35:10 +00:00
CompilerInvocation.cpp Added -ast-dump-filter option to clang -cc1. 2012-07-26 16:01:23 +00:00
CreateInvocationFromCommandLine.cpp [driver] When creating the compiler invocation out of command-line 2012-05-21 20:11:54 +00:00
DependencyFile.cpp Delete the depfile if we could not open a header file. We cannot 2011-11-21 00:01:14 +00:00
DependencyGraph.cpp Rename -dependency-graphviz to -dependencncy-dot 2012-02-02 23:45:13 +00:00
DiagnosticRenderer.cpp Move a few static functions from DiagnosticRenderer.cpp into SourceManager. 2012-06-18 20:12:05 +00:00
FrontendAction.cpp [libclang] Don't crash when saving a PCH from a prefix header 2012-06-08 05:48:06 +00:00
FrontendActions.cpp Added -ast-dump-filter option to clang -cc1. 2012-07-26 16:01:23 +00:00
FrontendOptions.cpp remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports 2011-07-23 10:55:15 +00:00
HeaderIncludeGen.cpp Basic: import SmallString<> into clang namespace 2012-02-05 02:13:05 +00:00
InitHeaderSearch.cpp Add -isystem-prefix and -ino-system-prefix arguments, which can be used to 2012-06-13 20:27:03 +00:00
InitPreprocessor.cpp Preprocessor: add __BYTE_ORDER__ predefined macro 2012-07-27 18:34:31 +00:00
LangStandards.cpp Remove unnecessary default cases in switches over enums. 2012-01-17 02:30:50 +00:00
LayoutOverrideSource.cpp Revert Decl's iterators back to pointer value_type rather than reference value_type 2012-06-06 20:45:41 +00:00
LogDiagnosticPrinter.cpp Basic: import SmallString<> into clang namespace 2012-02-05 02:13:05 +00:00
Makefile BUILD_ARCHIVE is the default for libraries, no need to set it. 2010-07-18 00:14:47 +00:00
MultiplexConsumer.cpp Replace MarkVarRequired with a more generic 2012-03-08 15:51:03 +00:00
PrintPreprocessedOutput.cpp [-E] Emit a rewritten _Pragma on its own line. 2012-06-15 23:33:51 +00:00
SerializedDiagnosticPrinter.cpp Fix an assertion hit when the serialized diagnostics writer receive a diagnostic 2012-05-10 05:03:45 +00:00
TextDiagnostic.cpp Fix a typo (the the => the) 2012-07-23 08:59:39 +00:00
TextDiagnosticBuffer.cpp Basic: import SmallString<> into clang namespace 2012-02-05 02:13:05 +00:00
TextDiagnosticPrinter.cpp Fix a typo (the the => the) 2012-07-23 08:59:39 +00:00
VerifyDiagnosticConsumer.cpp Allow -verify directives to be filtered by preprocessing. 2012-07-11 19:58:23 +00:00
Warnings.cpp Add template type diffing to Clang. This feature will provide a better 2012-06-26 18:18:47 +00:00