summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-12-09 18:30:42 +0000
committerdim <dim@FreeBSD.org>2011-12-09 18:30:42 +0000
commitdc04cb328508e61aad809d9b53b12f9799a00e7d (patch)
tree81d5fcacdf8f076da7b2359bb7d62be6a453f0da /include
parent3963a48221351c61c17fb3f382341ab04809a3d3 (diff)
downloadFreeBSD-src-dc04cb328508e61aad809d9b53b12f9799a00e7d.zip
FreeBSD-src-dc04cb328508e61aad809d9b53b12f9799a00e7d.tar.gz
Vendor import of clang 3.0 final release:
http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_30/final@145349
Diffstat (limited to 'include')
-rw-r--r--include/clang/Basic/Builtins.def6
-rw-r--r--include/clang/Driver/CC1Options.td11
-rw-r--r--include/clang/Driver/ToolChain.h12
-rw-r--r--include/clang/Frontend/HeaderSearchOptions.h23
4 files changed, 42 insertions, 10 deletions
diff --git a/include/clang/Basic/Builtins.def b/include/clang/Basic/Builtins.def
index e5690c1..e06e05b 100644
--- a/include/clang/Basic/Builtins.def
+++ b/include/clang/Basic/Builtins.def
@@ -672,16 +672,16 @@ LIBBUILTIN(rindex, "c*cC*i", "f", "strings.h", ALL_LANGUAGES)
LIBBUILTIN(bzero, "vv*z", "f", "strings.h", ALL_LANGUAGES)
// POSIX unistd.h
LIBBUILTIN(_exit, "vi", "fr", "unistd.h", ALL_LANGUAGES)
-LIBBUILTIN(vfork, "iJ", "fj", "unistd.h", ALL_LANGUAGES)
+LIBBUILTIN(vfork, "i", "fj", "unistd.h", ALL_LANGUAGES)
// POSIX setjmp.h
// In some systems setjmp is a macro that expands to _setjmp. We undefine
// it here to avoid having two identical LIBBUILTIN entries.
#undef setjmp
LIBBUILTIN(_setjmp, "iJ", "fj", "setjmp.h", ALL_LANGUAGES)
-LIBBUILTIN(__sigsetjmp, "iJ", "fj", "setjmp.h", ALL_LANGUAGES)
+LIBBUILTIN(__sigsetjmp, "iJi", "fj", "setjmp.h", ALL_LANGUAGES)
LIBBUILTIN(setjmp, "iJ", "fj", "setjmp.h", ALL_LANGUAGES)
-LIBBUILTIN(sigsetjmp, "iJ", "fj", "setjmp.h", ALL_LANGUAGES)
+LIBBUILTIN(sigsetjmp, "iJi", "fj", "setjmp.h", ALL_LANGUAGES)
LIBBUILTIN(setjmp_syscall, "iJ", "fj", "setjmp.h", ALL_LANGUAGES)
LIBBUILTIN(savectx, "iJ", "fj", "setjmp.h", ALL_LANGUAGES)
LIBBUILTIN(qsetjmp, "iJ", "fj", "setjmp.h", ALL_LANGUAGES)
diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td
index 4473d46..b9d835b 100644
--- a/include/clang/Driver/CC1Options.td
+++ b/include/clang/Driver/CC1Options.td
@@ -642,6 +642,17 @@ def isystem : JoinedOrSeparate<"-isystem">, MetaVarName<"<directory>">,
def iwithsysroot : JoinedOrSeparate<"-iwithsysroot">,MetaVarName<"<directory>">,
HelpText<"Add directory to SYSTEM include search path, "
"absolute paths are relative to -isysroot">;
+def internal_isystem : JoinedOrSeparate<"-internal-isystem">,
+ MetaVarName<"<directory>">,
+ HelpText<"Add directory to the internal system include search path; these "
+ "are assumed to not be user-provided and are used to model system "
+ "and standard headers' paths.">;
+def internal_externc_isystem : JoinedOrSeparate<"-internal-externc-isystem">,
+ MetaVarName<"<directory>">,
+ HelpText<"Add directory to the internal system include search path with "
+ "implicit extern \"C\" semantics; these are assumed to not be "
+ "user-provided and are used to model system and standard headers' "
+ "paths.">;
def iprefix : JoinedOrSeparate<"-iprefix">, MetaVarName<"<prefix>">,
HelpText<"Set the -iwithprefix/-iwithprefixbefore prefix">;
def iwithprefix : JoinedOrSeparate<"-iwithprefix">, MetaVarName<"<dir>">,
diff --git a/include/clang/Driver/ToolChain.h b/include/clang/Driver/ToolChain.h
index a5d51ca..2e6218a 100644
--- a/include/clang/Driver/ToolChain.h
+++ b/include/clang/Driver/ToolChain.h
@@ -195,15 +195,21 @@ public:
/// FIXME: this really belongs on some sort of DeploymentTarget abstraction
virtual bool hasBlocksRuntime() const { return true; }
+ /// \brief Add the clang cc1 arguments for system include paths.
+ ///
+ /// This routine is responsible for adding the necessary cc1 arguments to
+ /// include headers from standard system header directories.
+ virtual void AddClangSystemIncludeArgs(const ArgList &DriverArgs,
+ ArgStringList &CC1Args) const;
+
// GetCXXStdlibType - Determine the C++ standard library type to use with the
// given compilation arguments.
virtual CXXStdlibType GetCXXStdlibType(const ArgList &Args) const;
/// AddClangCXXStdlibIncludeArgs - Add the clang -cc1 level arguments to set
/// the include paths to use for the given C++ standard library type.
- virtual void AddClangCXXStdlibIncludeArgs(const ArgList &Args,
- ArgStringList &CmdArgs,
- bool ObjCXXAutoRefCount) const;
+ virtual void AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
+ ArgStringList &CC1Args) const;
/// AddCXXStdlibLibArgs - Add the system specific linker arguments to use
/// for the given C++ standard library type.
diff --git a/include/clang/Frontend/HeaderSearchOptions.h b/include/clang/Frontend/HeaderSearchOptions.h
index 92790e9..687f439 100644
--- a/include/clang/Frontend/HeaderSearchOptions.h
+++ b/include/clang/Frontend/HeaderSearchOptions.h
@@ -49,10 +49,24 @@ public:
/// path.
unsigned IgnoreSysRoot : 1;
+ /// \brief True if this entry is an internal search path.
+ ///
+ /// This typically indicates that users didn't directly provide it, but
+ /// instead it was provided by a compatibility layer for a particular
+ /// system. This isn't redundant with IsUserSupplied (even though perhaps
+ /// it should be) because that is false for user provided '-iwithprefix'
+ /// header search entries.
+ unsigned IsInternal : 1;
+
+ /// \brief True if this entry's headers should be wrapped in extern "C".
+ unsigned ImplicitExternC : 1;
+
Entry(StringRef path, frontend::IncludeDirGroup group,
- bool isUserSupplied, bool isFramework, bool ignoreSysRoot)
+ bool isUserSupplied, bool isFramework, bool ignoreSysRoot,
+ bool isInternal, bool implicitExternC)
: Path(path), Group(group), IsUserSupplied(isUserSupplied),
- IsFramework(isFramework), IgnoreSysRoot(ignoreSysRoot) {}
+ IsFramework(isFramework), IgnoreSysRoot(ignoreSysRoot),
+ IsInternal(isInternal), ImplicitExternC(implicitExternC) {}
};
/// If non-empty, the directory to use as a "virtual system root" for include
@@ -98,9 +112,10 @@ public:
/// AddPath - Add the \arg Path path to the specified \arg Group list.
void AddPath(StringRef Path, frontend::IncludeDirGroup Group,
- bool IsUserSupplied, bool IsFramework, bool IgnoreSysRoot) {
+ bool IsUserSupplied, bool IsFramework, bool IgnoreSysRoot,
+ bool IsInternal = false, bool ImplicitExternC = false) {
UserEntries.push_back(Entry(Path, Group, IsUserSupplied, IsFramework,
- IgnoreSysRoot));
+ IgnoreSysRoot, IsInternal, ImplicitExternC));
}
};
OpenPOWER on IntegriCloud