Define _GNU_SOURCE in C++ mode so that clang works with GNU libstdc++.

llvm-svn: 80289
This commit is contained in:
Eli Friedman
2009-08-27 22:01:41 +00:00
parent 8a46219c57
commit 80110179f4

View File

@@ -313,6 +313,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
// C++ translation unit.
DefineBuiltinMacro(Buf, "__cplusplus=199711L");
DefineBuiltinMacro(Buf, "__private_extern__=extern");
// Ugly hack to work with GNU libstdc++.
DefineBuiltinMacro(Buf, "_GNU_SOURCE=1");
}
// Filter out some microsoft extensions when trying to parse in ms-compat