mirror of
https://github.com/intel/llvm.git
synced 2026-02-03 18:44:31 +08:00
Predefine __cplusplus to the right value (199711L), except when in GNU mode.
llvm-svn: 78283
This commit is contained in:
@@ -305,7 +305,13 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
|
||||
DefineBuiltinMacro(Buf, "__EXCEPTIONS=1");
|
||||
DefineBuiltinMacro(Buf, "__GNUG__=4");
|
||||
DefineBuiltinMacro(Buf, "__GXX_WEAK__=1");
|
||||
DefineBuiltinMacro(Buf, "__cplusplus=1");
|
||||
if (LangOpts.GNUMode)
|
||||
DefineBuiltinMacro(Buf, "__cplusplus=1");
|
||||
else
|
||||
// C++ [cpp.predefined]p1:
|
||||
// The name_ _cplusplusis defined to the value199711Lwhen compiling a
|
||||
// C++ translation unit.
|
||||
DefineBuiltinMacro(Buf, "__cplusplus=199711L");
|
||||
DefineBuiltinMacro(Buf, "__private_extern__=extern");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user