diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2015-05-21 06:58:08 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2015-05-21 06:58:08 +0000 |
| commit | d5f23b0b7528b5c3caed1ba14f897cc4aaa9e3c3 (patch) | |
| tree | 133ab22e59f61162b7f8e8e794dd6458769e8e1a /include | |
| parent | 624e91b063cecc3671eeb40e4b0fa08d71b59284 (diff) | |
Notes
Diffstat (limited to 'include')
| -rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 5 | ||||
| -rw-r--r-- | include/clang/Basic/TargetCXXABI.h | 10 | ||||
| -rw-r--r-- | include/clang/Basic/TargetInfo.h | 6 | ||||
| -rw-r--r-- | include/clang/Sema/Sema.h | 1 | ||||
| -rw-r--r-- | include/clang/Sema/Template.h | 7 |
5 files changed, 29 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index b173d82a31d4..1a27e7cd3d2c 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -6972,6 +6972,11 @@ def note_neon_vector_initializer_non_portable_q : Note< "vcombine_%0%1(vcreate_%0%1(), vcreate_%0%1()) to initialize from integer " "constants">; +def err_builtin_longjmp_unsupported : Error< + "__builtin_longjmp is not supported for the current target">; +def err_builtin_setjmp_unsupported : Error< + "__builtin_setjmp is not supported for the current target">; + def err_builtin_longjmp_invalid_val : Error< "argument to __builtin_longjmp must be a constant 1">; def err_builtin_requires_language : Error<"'%0' is only available in %1">; diff --git a/include/clang/Basic/TargetCXXABI.h b/include/clang/Basic/TargetCXXABI.h index 5669d2a55937..42a976b3afde 100644 --- a/include/clang/Basic/TargetCXXABI.h +++ b/include/clang/Basic/TargetCXXABI.h @@ -79,6 +79,12 @@ public: /// - guard variables are smaller. GenericAArch64, + /// The generic Mips ABI is a modified version of the Itanium ABI. + /// + /// At the moment, only change from the generic ABI in this case is: + /// - representation of member function pointers adjusted as in ARM. + GenericMIPS, + /// The Microsoft ABI is the ABI used by Microsoft Visual Studio (and /// compatible compilers). /// @@ -114,6 +120,7 @@ public: case GenericARM: case iOS: case iOS64: + case GenericMIPS: return true; case Microsoft: @@ -130,6 +137,7 @@ public: case GenericARM: case iOS: case iOS64: + case GenericMIPS: return false; case Microsoft: @@ -212,6 +220,7 @@ public: case GenericItanium: case iOS: // old iOS compilers did not follow this rule case Microsoft: + case GenericMIPS: return true; } llvm_unreachable("bad ABI kind"); @@ -257,6 +266,7 @@ public: case GenericAArch64: case GenericARM: case iOS: + case GenericMIPS: return UseTailPaddingUnlessPOD03; // iOS on ARM64 uses the C++11 POD rules. It does not honor the diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h index 69a54044680d..7a6462c48227 100644 --- a/include/clang/Basic/TargetInfo.h +++ b/include/clang/Basic/TargetInfo.h @@ -852,6 +852,12 @@ public: } } + /// Controls if __builtin_longjmp / __builtin_setjmp can be lowered to + /// llvm.eh.sjlj.longjmp / llvm.eh.sjlj.setjmp. + virtual bool hasSjLjLowering() const { + return false; + } + protected: virtual uint64_t getPointerWidthV(unsigned AddrSpace) const { return PointerWidth; diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index bba7c3683498..a364214c11de 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -8550,6 +8550,7 @@ private: bool SemaBuiltinAssume(CallExpr *TheCall); bool SemaBuiltinAssumeAligned(CallExpr *TheCall); bool SemaBuiltinLongjmp(CallExpr *TheCall); + bool SemaBuiltinSetjmp(CallExpr *TheCall); ExprResult SemaBuiltinAtomicOverloaded(ExprResult TheCallResult); ExprResult SemaAtomicOpsOverloaded(ExprResult TheCallResult, AtomicExpr::AtomicOp Op); diff --git a/include/clang/Sema/Template.h b/include/clang/Sema/Template.h index c08a5df00b36..8f0d9da73ecb 100644 --- a/include/clang/Sema/Template.h +++ b/include/clang/Sema/Template.h @@ -273,6 +273,11 @@ namespace clang { /// outermost scope. LocalInstantiationScope *cloneScopes(LocalInstantiationScope *Outermost) { if (this == Outermost) return this; + + // Save the current scope from SemaRef since the LocalInstantiationScope + // will overwrite it on construction + LocalInstantiationScope *oldScope = SemaRef.CurrentInstantiationScope; + LocalInstantiationScope *newScope = new LocalInstantiationScope(SemaRef, CombineWithOuterScope); @@ -299,6 +304,8 @@ namespace clang { newScope->ArgumentPacks.push_back(NewPack); } } + // Restore the saved scope to SemaRef + SemaRef.CurrentInstantiationScope = oldScope; return newScope; } |
