aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/TargetInfo.h
diff options
context:
space:
mode:
authorMeador Inge <meadori@codesourcery.com>2012-06-16 03:34:49 +0000
committerMeador Inge <meadori@codesourcery.com>2012-06-16 03:34:49 +0000
commitc5613b26a24a33d7450e3d0bf315c6ccc920ce7b (patch)
treefb0bf936909135582b7dfb9ebb4d7300ec0fddf8 /include/clang/Basic/TargetInfo.h
parent860a319e62b0e256817a458396d191aa91c0787a (diff)
Explicitly build __builtin_va_list.
The target specific __builtin_va_list types are now explicitly built instead of injecting strings into the preprocessor input. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158592 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/TargetInfo.h')
-rw-r--r--include/clang/Basic/TargetInfo.h29
1 files changed, 26 insertions, 3 deletions
diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h
index 15e29c3d9a..aaf8cfe47c 100644
--- a/include/clang/Basic/TargetInfo.h
+++ b/include/clang/Basic/TargetInfo.h
@@ -128,6 +128,29 @@ public:
LongDouble
};
+ /// BuiltinVaListKind - The different kinds of __builtin_va_list types
+ /// defined by the target implementation.
+ enum BuiltinVaListKind {
+ /// typedef char* __builtin_va_list;
+ CharPtrBuiltinVaList = 0,
+
+ /// typedef void* __builtin_va_list;
+ VoidPtrBuiltinVaList,
+
+ /// __builtin_va_list as defined by the PNaCl ABI:
+ /// http://www.chromium.org/nativeclient/pnacl/bitcode-abi#TOC-Machine-Types
+ PNaClABIBuiltinVaList,
+
+ /// __builtin_va_list as defined by the Power ABI:
+ /// https://www.power.org
+ /// /resources/downloads/Power-Arch-32-bit-ABI-supp-1.0-Embedded.pdf
+ PowerABIBuiltinVaList,
+
+ /// __builtin_va_list as defined by the x86-64 ABI:
+ /// http://www.x86-64.org/documentation/abi.pdf
+ X86_64ABIBuiltinVaList
+ };
+
protected:
IntType SizeType, IntMaxType, UIntMaxType, PtrDiffType, IntPtrType, WCharType,
WIntType, Char16Type, Char32Type, Int64Type, SigAtomicType;
@@ -379,9 +402,9 @@ public:
/// idea to avoid optimizing based on that undef behavior.
virtual bool isCLZForZeroUndef() const { return true; }
- /// getVAListDeclaration - Return the declaration to use for
- /// __builtin_va_list, which is target-specific.
- virtual const char *getVAListDeclaration() const = 0;
+ /// getBuiltinVaListKind - Returns the kind of __builtin_va_list
+ /// type that should be used with this target.
+ virtual BuiltinVaListKind getBuiltinVaListKind() const = 0;
/// isValidClobber - Returns whether the passed in string is
/// a valid clobber in an inline asm statement. This is used by