1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | #ifndef LLVM_CLANG_LIB_CODEGEN_CGCLEANUP_H |
14 | #define LLVM_CLANG_LIB_CODEGEN_CGCLEANUP_H |
15 | |
16 | #include "EHScopeStack.h" |
17 | |
18 | #include "Address.h" |
19 | #include "llvm/ADT/SmallPtrSet.h" |
20 | #include "llvm/ADT/SmallVector.h" |
21 | |
22 | namespace llvm { |
23 | class BasicBlock; |
24 | class Value; |
25 | class ConstantInt; |
26 | class AllocaInst; |
27 | } |
28 | |
29 | namespace clang { |
30 | class FunctionDecl; |
31 | namespace CodeGen { |
32 | class CodeGenModule; |
33 | class CodeGenFunction; |
34 | |
35 | |
36 | |
37 | struct CatchTypeInfo { |
38 | llvm::Constant *RTTI; |
39 | unsigned Flags; |
40 | }; |
41 | |
42 | |
43 | class EHScope { |
44 | llvm::BasicBlock *CachedLandingPad; |
45 | llvm::BasicBlock *CachedEHDispatchBlock; |
46 | |
47 | EHScopeStack::stable_iterator EnclosingEHScope; |
48 | |
49 | class CommonBitFields { |
50 | friend class EHScope; |
51 | unsigned Kind : 3; |
52 | }; |
53 | enum { NumCommonBits = 3 }; |
54 | |
55 | protected: |
56 | class CatchBitFields { |
57 | friend class EHCatchScope; |
58 | unsigned : NumCommonBits; |
59 | |
60 | unsigned NumHandlers : 32 - NumCommonBits; |
61 | }; |
62 | |
63 | class CleanupBitFields { |
64 | friend class EHCleanupScope; |
65 | unsigned : NumCommonBits; |
66 | |
67 | |
68 | unsigned IsNormalCleanup : 1; |
69 | |
70 | |
71 | unsigned IsEHCleanup : 1; |
72 | |
73 | |
74 | unsigned IsActive : 1; |
75 | |
76 | |
77 | unsigned IsLifetimeMarker : 1; |
78 | |
79 | |
80 | unsigned TestFlagInNormalCleanup : 1; |
81 | |
82 | |
83 | unsigned TestFlagInEHCleanup : 1; |
84 | |
85 | |
86 | |
87 | unsigned CleanupSize : 12; |
88 | }; |
89 | |
90 | class FilterBitFields { |
91 | friend class EHFilterScope; |
92 | unsigned : NumCommonBits; |
93 | |
94 | unsigned NumFilters : 32 - NumCommonBits; |
95 | }; |
96 | |
97 | union { |
98 | CommonBitFields CommonBits; |
99 | CatchBitFields CatchBits; |
100 | CleanupBitFields CleanupBits; |
101 | FilterBitFields FilterBits; |
102 | }; |
103 | |
104 | public: |
105 | enum Kind { Cleanup, Catch, Terminate, Filter, PadEnd }; |
106 | |
107 | EHScope(Kind kind, EHScopeStack::stable_iterator enclosingEHScope) |
108 | : CachedLandingPad(nullptr), CachedEHDispatchBlock(nullptr), |
109 | EnclosingEHScope(enclosingEHScope) { |
110 | CommonBits.Kind = kind; |
111 | } |
112 | |
113 | Kind getKind() const { return static_cast<Kind>(CommonBits.Kind); } |
114 | |
115 | llvm::BasicBlock *getCachedLandingPad() const { |
116 | return CachedLandingPad; |
117 | } |
118 | |
119 | void setCachedLandingPad(llvm::BasicBlock *block) { |
120 | CachedLandingPad = block; |
121 | } |
122 | |
123 | llvm::BasicBlock *getCachedEHDispatchBlock() const { |
124 | return CachedEHDispatchBlock; |
125 | } |
126 | |
127 | void setCachedEHDispatchBlock(llvm::BasicBlock *block) { |
128 | CachedEHDispatchBlock = block; |
129 | } |
130 | |
131 | bool hasEHBranches() const { |
132 | if (llvm::BasicBlock *block = getCachedEHDispatchBlock()) |
133 | return !block->use_empty(); |
134 | return false; |
135 | } |
136 | |
137 | EHScopeStack::stable_iterator getEnclosingEHScope() const { |
138 | return EnclosingEHScope; |
139 | } |
140 | }; |
141 | |
142 | |
143 | |
144 | |
145 | |
146 | |
147 | class EHCatchScope : public EHScope { |
148 | |
149 | |
150 | |
151 | |
152 | |
153 | public: |
154 | struct Handler { |
155 | |
156 | |
157 | CatchTypeInfo Type; |
158 | |
159 | |
160 | llvm::BasicBlock *Block; |
161 | |
162 | bool isCatchAll() const { return Type.RTTI == nullptr; } |
163 | }; |
164 | |
165 | private: |
166 | friend class EHScopeStack; |
167 | |
168 | Handler *getHandlers() { |
169 | return reinterpret_cast<Handler*>(this+1); |
170 | } |
171 | |
172 | const Handler *getHandlers() const { |
173 | return reinterpret_cast<const Handler*>(this+1); |
174 | } |
175 | |
176 | public: |
177 | static size_t getSizeForNumHandlers(unsigned N) { |
178 | return sizeof(EHCatchScope) + N * sizeof(Handler); |
179 | } |
180 | |
181 | EHCatchScope(unsigned numHandlers, |
182 | EHScopeStack::stable_iterator enclosingEHScope) |
183 | : EHScope(Catch, enclosingEHScope) { |
184 | CatchBits.NumHandlers = numHandlers; |
185 | (0) . __assert_fail ("CatchBits.NumHandlers == numHandlers && \"NumHandlers overflow?\"", "/home/seafit/code_projects/clang_source/clang/lib/CodeGen/CGCleanup.h", 185, __PRETTY_FUNCTION__))" file_link="../../../include/assert.h.html#88" macro="true">assert(CatchBits.NumHandlers == numHandlers && "NumHandlers overflow?"); |
186 | } |
187 | |
188 | unsigned getNumHandlers() const { |
189 | return CatchBits.NumHandlers; |
190 | } |
191 | |
192 | void setCatchAllHandler(unsigned I, llvm::BasicBlock *Block) { |
193 | setHandler(I, CatchTypeInfo{nullptr, 0}, Block); |
194 | } |
195 | |
196 | void setHandler(unsigned I, llvm::Constant *Type, llvm::BasicBlock *Block) { |
197 | assert(I < getNumHandlers()); |
198 | getHandlers()[I].Type = CatchTypeInfo{Type, 0}; |
199 | getHandlers()[I].Block = Block; |
200 | } |
201 | |
202 | void setHandler(unsigned I, CatchTypeInfo Type, llvm::BasicBlock *Block) { |
203 | assert(I < getNumHandlers()); |
204 | getHandlers()[I].Type = Type; |
205 | getHandlers()[I].Block = Block; |
206 | } |
207 | |
208 | const Handler &getHandler(unsigned I) const { |
209 | assert(I < getNumHandlers()); |
210 | return getHandlers()[I]; |
211 | } |
212 | |
213 | |
214 | |
215 | |
216 | |
217 | void clearHandlerBlocks() { |
218 | for (unsigned I = 0, N = getNumHandlers(); I != N; ++I) |
219 | delete getHandler(I).Block; |
220 | } |
221 | |
222 | typedef const Handler *iterator; |
223 | iterator begin() const { return getHandlers(); } |
224 | iterator end() const { return getHandlers() + getNumHandlers(); } |
225 | |
226 | static bool classof(const EHScope *Scope) { |
227 | return Scope->getKind() == Catch; |
228 | } |
229 | }; |
230 | |
231 | |
232 | class alignas(8) EHCleanupScope : public EHScope { |
233 | |
234 | EHScopeStack::stable_iterator EnclosingNormal; |
235 | |
236 | |
237 | EHScopeStack::stable_iterator EnclosingEH; |
238 | |
239 | |
240 | |
241 | llvm::BasicBlock *NormalBlock; |
242 | |
243 | |
244 | |
245 | llvm::AllocaInst *ActiveFlag; |
246 | |
247 | |
248 | |
249 | |
250 | |
251 | struct ExtInfo { |
252 | |
253 | llvm::SmallPtrSet<llvm::BasicBlock*, 4> Branches; |
254 | |
255 | |
256 | SmallVector<std::pair<llvm::BasicBlock*,llvm::ConstantInt*>, 4> |
257 | BranchAfters; |
258 | }; |
259 | mutable struct ExtInfo *ExtInfo; |
260 | |
261 | |
262 | |
263 | |
264 | unsigned FixupDepth; |
265 | |
266 | struct ExtInfo &getExtInfo() { |
267 | if (!ExtInfo) ExtInfo = new struct ExtInfo(); |
268 | return *ExtInfo; |
269 | } |
270 | |
271 | const struct ExtInfo &getExtInfo() const { |
272 | if (!ExtInfo) ExtInfo = new struct ExtInfo(); |
273 | return *ExtInfo; |
274 | } |
275 | |
276 | public: |
277 | |
278 | |
279 | static size_t getSizeForCleanupSize(size_t Size) { |
280 | return sizeof(EHCleanupScope) + Size; |
281 | } |
282 | |
283 | size_t getAllocatedSize() const { |
284 | return sizeof(EHCleanupScope) + CleanupBits.CleanupSize; |
285 | } |
286 | |
287 | EHCleanupScope(bool isNormal, bool isEH, bool isActive, |
288 | unsigned cleanupSize, unsigned fixupDepth, |
289 | EHScopeStack::stable_iterator enclosingNormal, |
290 | EHScopeStack::stable_iterator enclosingEH) |
291 | : EHScope(EHScope::Cleanup, enclosingEH), |
292 | EnclosingNormal(enclosingNormal), NormalBlock(nullptr), |
293 | ActiveFlag(nullptr), ExtInfo(nullptr), FixupDepth(fixupDepth) { |
294 | CleanupBits.IsNormalCleanup = isNormal; |
295 | CleanupBits.IsEHCleanup = isEH; |
296 | CleanupBits.IsActive = isActive; |
297 | CleanupBits.IsLifetimeMarker = false; |
298 | CleanupBits.TestFlagInNormalCleanup = false; |
299 | CleanupBits.TestFlagInEHCleanup = false; |
300 | CleanupBits.CleanupSize = cleanupSize; |
301 | |
302 | (0) . __assert_fail ("CleanupBits.CleanupSize == cleanupSize && \"cleanup size overflow\"", "/home/seafit/code_projects/clang_source/clang/lib/CodeGen/CGCleanup.h", 302, __PRETTY_FUNCTION__))" file_link="../../../include/assert.h.html#88" macro="true">assert(CleanupBits.CleanupSize == cleanupSize && "cleanup size overflow"); |
303 | } |
304 | |
305 | void Destroy() { |
306 | delete ExtInfo; |
307 | } |
308 | |
309 | ~EHCleanupScope() = delete; |
310 | |
311 | bool isNormalCleanup() const { return CleanupBits.IsNormalCleanup; } |
312 | llvm::BasicBlock *getNormalBlock() const { return NormalBlock; } |
313 | void setNormalBlock(llvm::BasicBlock *BB) { NormalBlock = BB; } |
314 | |
315 | bool isEHCleanup() const { return CleanupBits.IsEHCleanup; } |
316 | |
317 | bool isActive() const { return CleanupBits.IsActive; } |
318 | void setActive(bool A) { CleanupBits.IsActive = A; } |
319 | |
320 | bool isLifetimeMarker() const { return CleanupBits.IsLifetimeMarker; } |
321 | void setLifetimeMarker() { CleanupBits.IsLifetimeMarker = true; } |
322 | |
323 | bool hasActiveFlag() const { return ActiveFlag != nullptr; } |
324 | Address getActiveFlag() const { |
325 | return Address(ActiveFlag, CharUnits::One()); |
326 | } |
327 | void setActiveFlag(Address Var) { |
328 | assert(Var.getAlignment().isOne()); |
329 | ActiveFlag = cast<llvm::AllocaInst>(Var.getPointer()); |
330 | } |
331 | |
332 | void setTestFlagInNormalCleanup() { |
333 | CleanupBits.TestFlagInNormalCleanup = true; |
334 | } |
335 | bool shouldTestFlagInNormalCleanup() const { |
336 | return CleanupBits.TestFlagInNormalCleanup; |
337 | } |
338 | |
339 | void setTestFlagInEHCleanup() { |
340 | CleanupBits.TestFlagInEHCleanup = true; |
341 | } |
342 | bool shouldTestFlagInEHCleanup() const { |
343 | return CleanupBits.TestFlagInEHCleanup; |
344 | } |
345 | |
346 | unsigned getFixupDepth() const { return FixupDepth; } |
347 | EHScopeStack::stable_iterator getEnclosingNormalCleanup() const { |
348 | return EnclosingNormal; |
349 | } |
350 | |
351 | size_t getCleanupSize() const { return CleanupBits.CleanupSize; } |
352 | void *getCleanupBuffer() { return this + 1; } |
353 | |
354 | EHScopeStack::Cleanup *getCleanup() { |
355 | return reinterpret_cast<EHScopeStack::Cleanup*>(getCleanupBuffer()); |
356 | } |
357 | |
358 | |
359 | bool hasBranches() const { return ExtInfo && !ExtInfo->Branches.empty(); } |
360 | |
361 | |
362 | |
363 | |
364 | |
365 | |
366 | |
367 | |
368 | |
369 | |
370 | |
371 | |
372 | void addBranchAfter(llvm::ConstantInt *Index, |
373 | llvm::BasicBlock *Block) { |
374 | struct ExtInfo &ExtInfo = getExtInfo(); |
375 | if (ExtInfo.Branches.insert(Block).second) |
376 | ExtInfo.BranchAfters.push_back(std::make_pair(Block, Index)); |
377 | } |
378 | |
379 | |
380 | unsigned getNumBranchAfters() const { |
381 | return ExtInfo ? ExtInfo->BranchAfters.size() : 0; |
382 | } |
383 | |
384 | llvm::BasicBlock *getBranchAfterBlock(unsigned I) const { |
385 | assert(I < getNumBranchAfters()); |
386 | return ExtInfo->BranchAfters[I].first; |
387 | } |
388 | |
389 | llvm::ConstantInt *getBranchAfterIndex(unsigned I) const { |
390 | assert(I < getNumBranchAfters()); |
391 | return ExtInfo->BranchAfters[I].second; |
392 | } |
393 | |
394 | |
395 | |
396 | |
397 | |
398 | |
399 | |
400 | |
401 | |
402 | |
403 | |
404 | |
405 | |
406 | |
407 | |
408 | |
409 | bool addBranchThrough(llvm::BasicBlock *Block) { |
410 | return getExtInfo().Branches.insert(Block).second; |
411 | } |
412 | |
413 | |
414 | bool hasBranchThroughs() const { |
415 | if (!ExtInfo) return false; |
416 | return (ExtInfo->BranchAfters.size() != ExtInfo->Branches.size()); |
417 | } |
418 | |
419 | static bool classof(const EHScope *Scope) { |
420 | return (Scope->getKind() == Cleanup); |
421 | } |
422 | }; |
423 | |
424 | |
425 | |
426 | |
427 | |
428 | |
429 | static_assert(alignof(EHCleanupScope) == EHScopeStack::ScopeStackAlignment, |
430 | "EHCleanupScope expected alignment"); |
431 | |
432 | |
433 | |
434 | |
435 | |
436 | |
437 | class EHFilterScope : public EHScope { |
438 | |
439 | |
440 | |
441 | llvm::Value **getFilters() { |
442 | return reinterpret_cast<llvm::Value**>(this+1); |
443 | } |
444 | |
445 | llvm::Value * const *getFilters() const { |
446 | return reinterpret_cast<llvm::Value* const *>(this+1); |
447 | } |
448 | |
449 | public: |
450 | EHFilterScope(unsigned numFilters) |
451 | : EHScope(Filter, EHScopeStack::stable_end()) { |
452 | FilterBits.NumFilters = numFilters; |
453 | (0) . __assert_fail ("FilterBits.NumFilters == numFilters && \"NumFilters overflow\"", "/home/seafit/code_projects/clang_source/clang/lib/CodeGen/CGCleanup.h", 453, __PRETTY_FUNCTION__))" file_link="../../../include/assert.h.html#88" macro="true">assert(FilterBits.NumFilters == numFilters && "NumFilters overflow"); |
454 | } |
455 | |
456 | static size_t getSizeForNumFilters(unsigned numFilters) { |
457 | return sizeof(EHFilterScope) + numFilters * sizeof(llvm::Value*); |
458 | } |
459 | |
460 | unsigned getNumFilters() const { return FilterBits.NumFilters; } |
461 | |
462 | void setFilter(unsigned i, llvm::Value *filterValue) { |
463 | assert(i < getNumFilters()); |
464 | getFilters()[i] = filterValue; |
465 | } |
466 | |
467 | llvm::Value *getFilter(unsigned i) const { |
468 | assert(i < getNumFilters()); |
469 | return getFilters()[i]; |
470 | } |
471 | |
472 | static bool classof(const EHScope *scope) { |
473 | return scope->getKind() == Filter; |
474 | } |
475 | }; |
476 | |
477 | |
478 | |
479 | class EHTerminateScope : public EHScope { |
480 | public: |
481 | EHTerminateScope(EHScopeStack::stable_iterator enclosingEHScope) |
482 | : EHScope(Terminate, enclosingEHScope) {} |
483 | static size_t getSize() { return sizeof(EHTerminateScope); } |
484 | |
485 | static bool classof(const EHScope *scope) { |
486 | return scope->getKind() == Terminate; |
487 | } |
488 | }; |
489 | |
490 | class EHPadEndScope : public EHScope { |
491 | public: |
492 | EHPadEndScope(EHScopeStack::stable_iterator enclosingEHScope) |
493 | : EHScope(PadEnd, enclosingEHScope) {} |
494 | static size_t getSize() { return sizeof(EHPadEndScope); } |
495 | |
496 | static bool classof(const EHScope *scope) { |
497 | return scope->getKind() == PadEnd; |
498 | } |
499 | }; |
500 | |
501 | |
502 | class EHScopeStack::iterator { |
503 | char *Ptr; |
504 | |
505 | friend class EHScopeStack; |
506 | explicit iterator(char *Ptr) : Ptr(Ptr) {} |
507 | |
508 | public: |
509 | iterator() : Ptr(nullptr) {} |
510 | |
511 | EHScope *get() const { |
512 | return reinterpret_cast<EHScope*>(Ptr); |
513 | } |
514 | |
515 | EHScope *operator->() const { return get(); } |
516 | EHScope &operator*() const { return *get(); } |
517 | |
518 | iterator &operator++() { |
519 | size_t Size; |
520 | switch (get()->getKind()) { |
521 | case EHScope::Catch: |
522 | Size = EHCatchScope::getSizeForNumHandlers( |
523 | static_cast<const EHCatchScope *>(get())->getNumHandlers()); |
524 | break; |
525 | |
526 | case EHScope::Filter: |
527 | Size = EHFilterScope::getSizeForNumFilters( |
528 | static_cast<const EHFilterScope *>(get())->getNumFilters()); |
529 | break; |
530 | |
531 | case EHScope::Cleanup: |
532 | Size = static_cast<const EHCleanupScope *>(get())->getAllocatedSize(); |
533 | break; |
534 | |
535 | case EHScope::Terminate: |
536 | Size = EHTerminateScope::getSize(); |
537 | break; |
538 | |
539 | case EHScope::PadEnd: |
540 | Size = EHPadEndScope::getSize(); |
541 | break; |
542 | } |
543 | Ptr += llvm::alignTo(Size, ScopeStackAlignment); |
544 | return *this; |
545 | } |
546 | |
547 | iterator next() { |
548 | iterator copy = *this; |
549 | ++copy; |
550 | return copy; |
551 | } |
552 | |
553 | iterator operator++(int) { |
554 | iterator copy = *this; |
555 | operator++(); |
556 | return copy; |
557 | } |
558 | |
559 | bool encloses(iterator other) const { return Ptr >= other.Ptr; } |
560 | bool strictlyEncloses(iterator other) const { return Ptr > other.Ptr; } |
561 | |
562 | bool operator==(iterator other) const { return Ptr == other.Ptr; } |
563 | bool operator!=(iterator other) const { return Ptr != other.Ptr; } |
564 | }; |
565 | |
566 | inline EHScopeStack::iterator EHScopeStack::begin() const { |
567 | return iterator(StartOfData); |
568 | } |
569 | |
570 | inline EHScopeStack::iterator EHScopeStack::end() const { |
571 | return iterator(EndOfBuffer); |
572 | } |
573 | |
574 | inline void EHScopeStack::popCatch() { |
575 | (0) . __assert_fail ("!empty() && \"popping exception stack when not empty\"", "/home/seafit/code_projects/clang_source/clang/lib/CodeGen/CGCleanup.h", 575, __PRETTY_FUNCTION__))" file_link="../../../include/assert.h.html#88" macro="true">assert(!empty() && "popping exception stack when not empty"); |
576 | |
577 | EHCatchScope &scope = cast<EHCatchScope>(*begin()); |
578 | InnermostEHScope = scope.getEnclosingEHScope(); |
579 | deallocate(EHCatchScope::getSizeForNumHandlers(scope.getNumHandlers())); |
580 | } |
581 | |
582 | inline void EHScopeStack::popTerminate() { |
583 | (0) . __assert_fail ("!empty() && \"popping exception stack when not empty\"", "/home/seafit/code_projects/clang_source/clang/lib/CodeGen/CGCleanup.h", 583, __PRETTY_FUNCTION__))" file_link="../../../include/assert.h.html#88" macro="true">assert(!empty() && "popping exception stack when not empty"); |
584 | |
585 | EHTerminateScope &scope = cast<EHTerminateScope>(*begin()); |
586 | InnermostEHScope = scope.getEnclosingEHScope(); |
587 | deallocate(EHTerminateScope::getSize()); |
588 | } |
589 | |
590 | inline EHScopeStack::iterator EHScopeStack::find(stable_iterator sp) const { |
591 | (0) . __assert_fail ("sp.isValid() && \"finding invalid savepoint\"", "/home/seafit/code_projects/clang_source/clang/lib/CodeGen/CGCleanup.h", 591, __PRETTY_FUNCTION__))" file_link="../../../include/assert.h.html#88" macro="true">assert(sp.isValid() && "finding invalid savepoint"); |
592 | (0) . __assert_fail ("sp.Size <= stable_begin().Size && \"finding savepoint after pop\"", "/home/seafit/code_projects/clang_source/clang/lib/CodeGen/CGCleanup.h", 592, __PRETTY_FUNCTION__))" file_link="../../../include/assert.h.html#88" macro="true">assert(sp.Size <= stable_begin().Size && "finding savepoint after pop"); |
593 | return iterator(EndOfBuffer - sp.Size); |
594 | } |
595 | |
596 | inline EHScopeStack::stable_iterator |
597 | EHScopeStack::stabilize(iterator ir) const { |
598 | assert(StartOfData <= ir.Ptr && ir.Ptr <= EndOfBuffer); |
599 | return stable_iterator(EndOfBuffer - ir.Ptr); |
600 | } |
601 | |
602 | |
603 | struct EHPersonality { |
604 | const char *PersonalityFn; |
605 | |
606 | |
607 | |
608 | |
609 | const char *CatchallRethrowFn; |
610 | |
611 | static const EHPersonality &get(CodeGenModule &CGM, const FunctionDecl *FD); |
612 | static const EHPersonality &get(CodeGenFunction &CGF); |
613 | |
614 | static const EHPersonality GNU_C; |
615 | static const EHPersonality GNU_C_SJLJ; |
616 | static const EHPersonality GNU_C_SEH; |
617 | static const EHPersonality GNU_ObjC; |
618 | static const EHPersonality GNU_ObjC_SJLJ; |
619 | static const EHPersonality GNU_ObjC_SEH; |
620 | static const EHPersonality GNUstep_ObjC; |
621 | static const EHPersonality GNU_ObjCXX; |
622 | static const EHPersonality NeXT_ObjC; |
623 | static const EHPersonality GNU_CPlusPlus; |
624 | static const EHPersonality GNU_CPlusPlus_SJLJ; |
625 | static const EHPersonality GNU_CPlusPlus_SEH; |
626 | static const EHPersonality MSVC_except_handler; |
627 | static const EHPersonality MSVC_C_specific_handler; |
628 | static const EHPersonality MSVC_CxxFrameHandler3; |
629 | static const EHPersonality GNU_Wasm_CPlusPlus; |
630 | |
631 | |
632 | |
633 | bool usesFuncletPads() const { |
634 | return isMSVCPersonality() || isWasmPersonality(); |
635 | } |
636 | |
637 | bool isMSVCPersonality() const { |
638 | return this == &MSVC_except_handler || this == &MSVC_C_specific_handler || |
639 | this == &MSVC_CxxFrameHandler3; |
640 | } |
641 | |
642 | bool isWasmPersonality() const { return this == &GNU_Wasm_CPlusPlus; } |
643 | |
644 | bool isMSVCXXPersonality() const { return this == &MSVC_CxxFrameHandler3; } |
645 | }; |
646 | } |
647 | } |
648 | |
649 | #endif |
650 | |